Yes, this can be done. I assume the sending account and the relationship to
the Contact item is based on the recipient's e-mail address in the To: line?
You'd need to use that address to use the Items.Restrict method or
AdvancedSearch object against the items in the Contacts folder. Assuming you
only get one ContactItem in the query results, you can then read the
ContactItem.Categories property to parse the list of applied Categories.
Then use that value to map to the name of the e-mail account, and use a
CommandBarButton.Execute object/method to programmatically click the account
in the Accounts drop-down menu (the sending account can't be set using the
Outlook Object Model, hence the trick of clicking the button).
Hope this gets you started...
--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog:
http://blogs.officezealot.com/legault/
"Perplexed" wrote:
Is it possible to code Outlook XP to use a specific mail account to send
email based on the Catagory set in the contact list? If so, where do I start?
I have multiple email addresses and am forever forgetting to change the
account when I send to mail lists.
Perplexed