I am developing an application in access 2007. The app needs to send emails to customers but the account from which the email is sent is dependent on the customer. At the moment I am using "DoCmd.SendObject" but I don't know how to change the "from" address. If someone could point me in the right direction or give me a code sample of how to manipulate the "from" address I'd be really grateful. Thanks, lookatmypie
There's a SentOfBehalfOfName property, but I don't think you would be able to access it outside of Outlook, so you would probably need to instantiate the Outlook object model. Also, the end user would need to be set up to use that feature. There were some recent threads here and in the Excel ng about how to change the From account so it appears the email is coming from a completely different address, here's what I could find: http://tinyurl.com/3rd8tw http://tinyurl.com/4t686r HTH, JP On Apr 25, 10:54 am, lookatmypie wrote: > I am developing an application in access 2007. The app needs to send emails > to customers but the account from which the email is sent is dependent on the > customer. At the moment I am using "DoCmd.SendObject" but I don't know how to > change the "from" address. If someone could point me in the right direction > or give me a code sample of how to manipulate the "from" address I'd be > really grateful. > Thanks, > lookatmypie
In earlier versions it is more awkward but in 2007 you can use the SendUsingAccount property of the MailItem. -- Enjoy, Tony "lookatmypie" wrote in message news:13C26A28-BE68-43D8-A721-F0037F0863C0@microsoft.com... >I am developing an application in access 2007. The app needs to send emails > to customers but the account from which the email is sent is dependent on > the > customer. At the moment I am using "DoCmd.SendObject" but I don't know how > to > change the "from" address. If someone could point me in the right > direction > or give me a code sample of how to manipulate the "from" address I'd be > really grateful. > Thanks, > lookatmypie