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

Automating the selection of email accounts upon adding email addre



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 27th 09, 10:00 AM posted to microsoft.public.outlook.program_vba
Sillyrabbit
external usenet poster
 
Posts: 1
Default Automating the selection of email accounts upon adding email addre

I'm new to programming for Outlook - I'm not even sure this is the right
forum.

Is it possible to associate an email account to a person in your contacts
with Outlook 2007? - I have personal email accounts and business email
accounts. Everytime I add Thomas Smith to the To input, I'd like Outlook to
recognize it and set the account to from which the email will be sent to my
business account. If I'm sending an email to my brother, I want it to send it
from my personal account. - All while not having to manually select the
account, because I don't always remember.

In the event that both professional and personal contacts are on a single
email, I'd like Outlook to fire up an alert box reminding me to select the
correct email account.

Firing an alert box to remind me to select the correct account would be an
option if there is no way to associate the contact with a specific account.

Thanks in advance

Ads
  #2  
Old June 29th 09, 02:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Automating the selection of email accounts upon adding email addre

For Outlook 2007 you can use the MailItem.SendUsingAccount object property
for that. You can select from the Accounts collection the appropriate
account to use to send based on the contact being sent to. For that you'd
get the Recipients collection of the email and get each Recipient You can
then use the Recipient.AddressEntry.GetContact() method to get the
ContactItem for that recipient object and check it for which account to use.

See the Object Browser in the Outlook VBA project for information on those
methods and properties and for sample code for them.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Sillyrabbit" wrote in message
...
I'm new to programming for Outlook - I'm not even sure this is the right
forum.

Is it possible to associate an email account to a person in your contacts
with Outlook 2007? - I have personal email accounts and business email
accounts. Everytime I add Thomas Smith to the To input, I'd like Outlook
to
recognize it and set the account to from which the email will be sent to
my
business account. If I'm sending an email to my brother, I want it to send
it
from my personal account. - All while not having to manually select the
account, because I don't always remember.

In the event that both professional and personal contacts are on a single
email, I'd like Outlook to fire up an alert box reminding me to select the
correct email account.

Firing an alert box to remind me to select the correct account would be an
option if there is no way to associate the contact with a specific
account.

Thanks in advance


 




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
adding email accounts Red4Con1 Outlook - General Queries 6 November 21st 06 10:56 PM
Selection of an email header triggering email download, why ? Jean Navarro Outlook - General Queries 9 November 8th 06 06:02 PM
Adding email accounts. Nicole Outlook - General Queries 2 July 25th 06 02:01 PM
Delete Outlook Address Book Records with Undeliverable Email Addre sluice Outlook and VBA 0 June 15th 06 02:43 PM
Automating Outlook - .msg works but email not sent immediately GregCost Outlook and VBA 0 May 25th 06 12:08 PM


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