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

How to select different Account in Macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 2nd 07, 10:51 AM posted to microsoft.public.outlook.program_vba
Arun
external usenet poster
 
Posts: 10
Default How to select different Account in Macro

hi all,

I have writen code in Macro to send mail, but i wants to send from different
account not from my account,bcos i have involved in 2 different acctivities,
each activitiy has different Email account.

how to set account in Macro

Ads
  #2  
Old November 2nd 07, 12:12 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to select different Account in Macro

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) In an Exchange environment where you want to use another user's mailbox as the From address, set the MailItem.SentOnBehalfOfName property. If you do not want the current user's name to appear in the message at all, the Exchange administrator must grant Send As permission on the other user's mailbox.

2) If the user has Outlook 2002/3 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.

3) 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:

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

5) 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


"Arun" wrote in message ...
hi all,

I have writen code in Macro to send mail, but i wants to send from different
account not from my account,bcos i have involved in 2 different acctivities,
each activitiy has different Email account.

how to set account in Macro

 




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
select e-mail account for sending message BBran Outlook - General Queries 12 August 3rd 07 04:42 PM
In OL 07, how do you select the account to send from? Bruce Outlook - General Queries 1 June 1st 07 02:34 PM
Macro to select form in Personal Forms Library LDMueller Outlook and VBA 5 January 18th 07 09:07 PM
How to select the Internet account programmatically? James Outlook and VBA 1 October 30th 06 05:00 AM
How to select the sending account in a CW install outlook 2000 user Outlook - Installation 1 April 22nd 06 04:22 AM


All times are GMT +1. The time now is 03:37 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.