Email via non-Default email Account using Sendobject

ShredDude

Registered User.
Local time
Yesterday, 21:15
Joined
Jan 1, 2009
Messages
71
I'm wondering if there would be a way to have an email generated by Access's sendObject method for example, that could use the non-default email account in your Outlook setup.

I have a button that launches an email with a PDF attachment with the following line of code:

Code:
DoCmd.SendObject acSendForm, "frmEmailScenarios", acFormatPDF, strTo, , , strSubject, strBody

It seems the SendObject method provides no attribute for defining the account From which you wish to send this email. It gets launched from the default account in Outlook. As the code is above, it is using the default value of the EditMessage attribute, causing the new email to pop-up prior to being sent, allowing the user to make changes before it goes out. Thus, the user could select another account at that time.

Ultimately though, I'd like to set the EditMessage attribute to Zero (False), so that the message could go off without user interaction, if I could set the From account via code somehow given a certain set of circumstances.

Looks like I get to use the more elaborate method of tying into the Outlook object to achieve this?

Any ideas out there to keep this simple?
 
My guess would be to use the Outlook object, but even then, I don't think it is worth your time sir.
 

Users who are viewing this thread

Back
Top Bottom