![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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. |
Ads |
#2
|
|||
|
|||
![]()
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 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Daryll" wrote in message ... 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatically use specific email account when emailing specific co | Jennifer | Outlook - Installation | 2 | August 14th 09 10:04 PM |
Rules for a specific account | roh008 | Outlook - Using Forms | 0 | July 7th 09 01:19 PM |
select e-mail account for sending message | BBran | Outlook - General Queries | 12 | August 3rd 07 04:42 PM |
Send email from SPECIFIC account only | [email protected] | Outlook - General Queries | 3 | August 2nd 07 05:34 PM |
Outlook--Sending a Copy of a Message to a Specific Folder | [email protected] | Outlook - General Queries | 4 | March 5th 06 07:26 PM |