Distribution Lists and Contacts

  • Thread starter Thread starter Sanjay Singh
  • Start date Start date
S

Sanjay Singh

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
 
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
 
Back
Top