Outlook Developer Home
Outlook Programmer's Library
Outlook Technologies
Outlook Forms
Other Technologies



To search for an e-mail address in Contacts

Both the Find and Advanced Find features in Outlook search only the display name portion of an e-mail address. They do not search the underlying address itself. This Outlook VBA sample opens the first contact in the Contacts folder that matches the address that you type into the InputBox popup.

Code Sample


The code uses two devices to improve performance -- the Restrict method to narrow the search only to those items with e-mail addresses and the SetColumns method to restrict the active data set to the three e-mail address fields that we want to search.

This sample returns only the first matching contact. To return all matches, you might use a VBA form with a list box on it that includes each matching contact's EntryID in a hidden column. You could then use the GetItemFromID method to open the item selected in the list box.

More Information

2002-7 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

get Sue's code | forums | share your own code | registration