Search code examples
c#outlookvstoaddressbook

C# Outlook VSTO - is there anyway to search the global addresslist with partial string / wildcard filter?


I have a VSTO addin and i am trying to display a list of folks in my address list into a form. I want to search in my global address list but only do a search based on a wildcard character.

I see this code loops through all of the entries in the address list but i have over 100K entries so i don't want to do a loop so I thought there might be a way to do an upfront filter in the search

I want to search for any person in the address book who's name starts with "ABC" as an example. Is this possible?


Solution

  • I would actually use EWS (Exchange's WCF like web service) as opposed to using VSTO. This way the code can be invoked on almost any environment.

    http://vivekiyer.net/2010/07/17/querying-the-global-address-list-gal-via-exchange-web-services-ews/