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:
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?
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?