TomJ72

When you are creating a new email in outlook 2003, there is a dropdown list "select names from" (or something like that, I do not know since I do not have the english language version).

I would like to attach a new option to this dropdown and when that new option of mine is selected, it will trigger a method of mine that will fetch the contacts from an external source (through a web services invocation) and display those contacts in the dialog to let the user select from that list of contacts.

So, is this possible in Outlook 2003
If it is not, is it possible in Outlook 2007

If it is possible, where can I find a code example illustrating how to:
(1) add an option to the dropdown list
(2) attach a concrete class/method (which will implement some MS defined interface or event delegate) which will become triggered when the added option is selected by the user
(3) modify the content of the dialog, i.e. the list of contacts that I will have retrieve from an external source

/ Tomas


Re: Visual Studio Tools for Office Is it possible to create a plugin that fetches a contact list from an external source, when you create an email ?

Sue Mosher - Outlook MVP

1) That dropdown lists MAPI address lists providers present in the current user's Outlook mail profile. Therefore, to add a new source, you must add a new address list. Since you're working with a web service, probably the easiest method is to make the web service look like a SharePoint contacts list. There's a good article from Stephen Toub on how to do this at http://blogs.msdn.com/toub/archive/2004/12/22/330125.aspx. Once the "contacts" are visible as a folder in Outlook, set the MAPIFolder.ShowAsOutlookAB property to True to expose the folder's contents under the Outlook Address Book.

2) The Address Book dialog interaction exposes no Outlook events at all.

3) The list displayed would be the list returned by the web service, showing the fields defined by Outlook. The field list is not customizable.





Re: Visual Studio Tools for Office Is it possible to create a plugin that fetches a contact list from an external source, when you create an email ?

TomJ72

Okay Sue, thank you for the answer.
Is the answer the same for Outlook 2007, or is the Outlook 2007 dialog field list more customizable and the dropdown expose any events

/ Tomas





Re: Visual Studio Tools for Office Is it possible to create a plugin that fetches a contact list from an external source, when you create an email ?

Sue Mosher - Outlook MVP

It works exactly the same in Outlook 2007. This isn't an issue of customization, but of what that dialog does. It exposes the contents of MAPI address book providers that have instances in the users mail profile. If to add another address list to the drop-down list, you must add an instance of the desired address list to the mail profile. If you want the information displayed by that list to look differnt, you would need to write your own address book provider, a topic that is way beyond the scope of this forum.