find a contact by email RRS feed

  • Question

  • how can i find a contact from the address book without iterate all the address book?

    (it's take a lot of time)


    Sunday, August 5, 2012 3:25 PM


  • If you know which folder the contact resides in, you can use MAPOFolder.Items.Find("[Email1Address] = 'some value' ").

    You can pass the e-mail address to Namespace.CreateRecipient, then use Recipient.AddressEntry.GetContact (be prepared to handle nulls), but you might end up with a contact from the Suggested Contacts folder insteda of the expected folder.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    • Marked as answer by redgolda Monday, August 6, 2012 7:59 AM
    Sunday, August 5, 2012 4:16 PM