Can I set a specific account for sending a message ?

D

Daryll

In my outlook 2003 set up I have three internet e-mail accounts, used for
different purposes. I have three different macros which I use to forward
emails to different addresses, but I want each macro to use a specific
e-mail account.

Is it possible when using automation to send messages in visual basic to
programmatically set a specific account as the account to be used when
sending the message. I know that TO, SUBJECT, CC, ADDRESS, and so on can be
set, but I haven't been able to find any visual basic code to cover setting
a specific account.
 
S

Sue Mosher [MVP]

Outlook 2007 adds a MailItem.SendUsingAccount property.

For earlier versions, Outlook provides no direct way to change the account
for an outgoing message. These are known workarounds using native Outlook
functionality:

1) If the user has Outlook 2003 and is not using WordMail as the editor, you
set the sending account using CommandBars techniques. See
http://www.outlookcode.com/codedetail.aspx?id=889 for sample code.

2) If you're mainly concerned about replies to your message going to the
correct place, add the desired reply address to the MailItem.ReplyRecipients
collection.

The third-party Redemption ( http://www.dimastr.com/redemption/ ) library
adds two other solutions:

3) Set an RFC822 header property, as described at
http://www.dimastr.com/redemption/faq.htm#14

4) Set the RDOMail.Account property, as described at
http://www.dimastr.com/redemption/rdo/RDOMail.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top