Distribution Lists and Contacts

Discussion in 'Microsoft Outlook VBA Programming' started by Sanjay Singh, Jun 3, 2004.

  1. Sanjay Singh

    Sanjay Singh Guest

    Is there any way of retrieving the actual Contact for a member of a
    Distribution List?

    I see from Sue's book that we can use GetMember to return a recipeint
    object.
    However I would like to use other fields such as Company Name for the
    related contact.

    Is this possible ...
    I also use Redemption so maybe there is so way using Redemption.
    Please help.

    Sanjay
     
    Sanjay Singh, Jun 3, 2004
    #1
    1. Advertisements

  2. If you use OutlookSpy to look at the Members and OneOffMembers PT_MV_BINARY
    properties of a DL and then look at one of the binaries of those
    PT_MV_BINARY properties you will see that buried inside the binary is the
    SMTP address of the member.for one-off members, and for members if you strip
    off the first 21 characters you get the contact EntryID from the remaining
    characters of that binary.

    So if you retrieve those properties as variant arrays using the Fields
    collection of the SafeDistList object and convert them one at a time into
    strings using Redemption's MAPIUtils.HrArrayToString method you can then
    directly get the contacts or one-off members. Once you have a contact you
    can easily get the related CompanyName.

    Members is property tag &H80D01102 and OneOffMembers is property tag
    &H80D21102

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm


    "Sanjay Singh" <> wrote in message
    news:%...
    > Is there any way of retrieving the actual Contact for a member of a
    > Distribution List?
    >
    > I see from Sue's book that we can use GetMember to return a recipeint
    > object.
    > However I would like to use other fields such as Company Name for the
    > related contact.
    >
    > Is this possible ...
    > I also use Redemption so maybe there is so way using Redemption.
    > Please help.
    >
    > Sanjay
    >
    >
     
    Ken Slovak - [MVP - Outlook], Jun 4, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. elziko

    Recipients in Distribution lists and accounts question

    elziko, Aug 27, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    567
    elziko
    Aug 27, 2003
  2. Mladen Spoljaric

    Problems with distribution lists from VBA

    Mladen Spoljaric, Sep 16, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    629
    Mladen Spoljaric
    Sep 16, 2003
  3. John Birtwistle

    Addmembers and Distribution Lists

    John Birtwistle, Oct 30, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    3
    Views:
    280
    John B
    Dec 30, 2003
  4. Mike

    Distribution list that includes other distribution lists.

    Mike, Jan 8, 2008, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    254
  5. Zaneb123

    VBA help with Contacts and Distribution lists in Outlook 2003

    Zaneb123, Jul 11, 2008, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    291
    Michael Bauer [MVP - Outlook]
    Jul 15, 2008
Loading...

Share This Page