![]() |
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
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
Eric Legault [MVP - Outlook] ha scritto:
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... Hi, i have the same problem, i try to find the Accounts drop-down menu and programmatically click the rigth account but i don't find the menu. You can show me the rigth way? With other button and /or command menu i be succesfull, but not with ccounts drop-down menu. Tanks. Bye, sorry for my english ![]() |
#4
|
|||
|
|||
![]()
Your English is fine.
I am still researching Items.Restrict Method. The original response was a bit more advanced than my current level of ability but it pointed me in te direction of where to look. I haven't done much coding in Outlook. Perplexed |
#5
|
|||
|
|||
![]()
Take a look at the code sample at
http://www.outlookcode.com/codedetail.aspx?id=889 and note that it has some important limitations. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "DARIO MASSARONI" wrote in message ... Eric Legault [MVP - Outlook] ha scritto: 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... Hi, i have the same problem, i try to find the Accounts drop-down menu and programmatically click the rigth account but i don't find the menu. You can show me the rigth way? With other button and /or command menu i be succesfull, but not with ccounts drop-down menu. Tanks. Bye, sorry for my english ![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does deleting e-mail account delete the account from my computer? | MPKinney | Outlook - Installation | 2 | February 5th 06 01:26 AM |
Does deleting e-mail account delete the account from my computer? | Jocelyn Fiorello [MVP - Outlook] | Outlook - Installation | 1 | February 4th 06 07:40 PM |
setting up another mail account | sami.s | Outlook - General Queries | 1 | January 20th 06 06:09 PM |
Mail account,IE6 | Percy | Outlook Express | 2 | January 18th 06 07:59 PM |
Secondary Mail Account | Ash Harris | Outlook - General Queries | 2 | January 8th 06 09:25 PM |