none
Reconciling an Outlook contact e-mail address against an Exchange distribution group RRS feed

  • Question

  • I have developed an Outlook plug-in that checks to see if any of the recipients of a message are members of a given Exchange distribution group. When the recipient is selected directly from the Global Address List, it is relatively straightforward to determine if they are a member of a given distribution group. However, I must also be able to reconcile contact items as well. I am able to do this, but I have to loop through members of the distribution list until I find a member whose e-mail address matches one of the three potential addresses associated with the contact item.

    Is there a better way to accomplish this task?

    Friday, November 2, 2012 11:19 PM

Answers

  • Use ExchangeUser.GetMemberOfList.

    ExchangeUser object can be retrieved from AddressEnttry.GetExchangeUser.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, November 2, 2012 11:46 PM
  • For a regular contact, if ContactItem.Email1AddressType == "EX", use the value of the ContactItem.Email1EntryID to call Namespace.GetAddressEntryFromID. Once you have the address entry object, you can reuse the same code that you already use to process the GAL entries.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, November 9, 2012 7:10 PM

All replies

  • Use ExchangeUser.GetMemberOfList.

    ExchangeUser object can be retrieved from AddressEnttry.GetExchangeUser.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, November 2, 2012 11:46 PM
  • I am already doing that for members of the GAL. It won't work for a regular contact. That's what I thought. Thanks anyway.
    Friday, November 9, 2012 9:08 AM
  • For a regular contact, if ContactItem.Email1AddressType == "EX", use the value of the ContactItem.Email1EntryID to call Namespace.GetAddressEntryFromID. Once you have the address entry object, you can reuse the same code that you already use to process the GAL entries.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, November 9, 2012 7:10 PM