A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Can I set a specific account for sending a message ?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 11th 09, 04:11 PM posted to microsoft.public.outlook.program_vba
Daryll
external usenet poster
 
Posts: 1
Default Can I set a specific account for sending a 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.




Ads
  #2  
Old December 11th 09, 04:30 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Can I set a specific account for sending a message ?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 03:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.