Adding recipients to DistList Item

  • Thread starter Thread starter Paul Johnston
  • Start date Start date
P

Paul Johnston

I've been trying to add some contacts to distribution lists programmatically
and have noticed that you can only add contacts that have a single
"distributable" field (i.e. only one of email1, email2, email3, businessFax,
HomeFax, OtherFax, etc. is non-null). Manually, it's easy, you open the
distribution list, push "add members" and selec and it will add a copy of
that contact in the Distribution List for each "distribution" field.

Has anyone done this?

I've been trying to use a normal ActiveX DLL to build my distribution lists.
I have not tried a COM Add-in yet because I don't know if I'll be able to do
this very important task.

Thanks in advance, folks
 
How are you adding the recipients in the AddMembers method? You should be
able to use the SMTP address you want to create a recipient object and add
that, although it might be a one-off member when you do that.
 
One-offing is the only way to do that. Outlook stores entry ids of each
member in two properties: one-off entry ids and fake entry ids. Fake entry
ids for the members that come from the IPM.Contact messages have a flag that
specifies which address is being used (email1, email2, fax, etc) besides the
entry id of the IPM.Contct message. Unless you drop to the Extended MAPI
level and construct the fake entry ids programmatically, there is no way to
add a contact programmatically and specify which e-mail must be added.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top