Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendObject error 2287 when trying to send to outlook

Status
Not open for further replies.

dpk136

MIS
Jan 15, 2004
335
US
I will give a little background first.

Trying to send a report as an attachment to customer.
I use
Code:
DoCmd.SendObject acSendReport, "rptQuoteEmail", acFormatHTML, Reports![rptQuoteEmail]![Email], , , "Machinery Quote(s) You Requested", "", True, strPath & "Quote Template.html"

I have two ways that users connect to the system. The first way is just by using it on their local machines (this way works for sending the email). The other way is coming in through terminal Services. This way does not work. I set up Outlook on the TS side and it works when users log in and send email that way. They are using exchange server. All the applications are MS newest and greatest.

When i try to run this command, it just gives me Run time error 2287. Can't open the mail session. Can anyone give me any help. I'm not sure what is going on.

Side note:
All of the items running on the server are running the newest updates and patches.
The only difference between the two ways of doing it is the terminal services.

Thanks to anyone that helps! this is very very urgent

David Kuhn
------------------
 
You should have a look at using CDO and SMTP in particular. I am not familiar with Terminal Services, but when I needed to deploy an application through CITRIX this is what I used (CITRIX won't let the app access anything on local machine, like outlook. I imagine this is similar to problem you are having.)

The main problem I see that you will have is getting your report into HTML format for inclusion in the email, but maybe someone else can help with that. If it is simply a query result I do know of a way to build an HTML table from that.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Getting the Report in the exact way that i want it is an issue. Also an issue is they would like to be able to enter the body of the email. Using CDO or SMTP will not work in that case. Thanks for the suggestions though. Keep them coming guys

David Kuhn
------------------
 
So you want to be able to have the email display on the screen? You can enter body using CDO by prompting with a message box or providing a form, but you will not be able to have the email open on the screen. I would create a form that looks somewhat like outlook's email screen to allow them to enter this information.

However, if it is for some reason an absolute necessity to display the actual outlook screen, you might have to install outlook on the server. And like I said, I don't know how Terminal Services works, so this might not even give the result you are after.

Do you have to deploy through Terminal Services, or can you put together a front end/back end setup and give users a local copy of the front end?

Good luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Well, they are connecting through Terminal Services because they are at remote locations. Outlook is installed on the server, it is basically a shared installation of Outlook.

David Kuhn
------------------
 
I just did a full search of microsoft and no one on there has any answers. I also searched google groups and it seems that there are a couple people having the same issue, just no one has been able to solve it.

David Kuhn
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top