Linking Distribution list contact using Redemption fails

  • Thread starter Thread starter Ronald van Aalten
  • Start date Start date
R

Ronald van Aalten

My code adds a contact (who has 2 email addresses) to a DL using
Redemption's recipients.addex method (Redemption version: 3.40335). Althouh
..resolved returns true the contact has no link to the contact inspector.

=== Here's the code =======
Dim oredDL As Redemption.SafeDistList, oredRec As
Redemption.SafeRecipient
Dim oredMail As Redemption.SafeMailItem
Dim oMail As Object, oDlnw As Object, oAE As Outlook.AddressEntry

Set oDlnw = moNS.Folders("Mymail").Folders("Test").Items("DistListTest")
Set oredDL = CreateObject("Redemption.SafeDistList")
oredDL.Item = oDlnw

Set oMail = moOutl.CreateItem(olMailItem)
Set oredMail = CreateObject("Redemption.SafeMailItem")
oredMail.Item = oMail
Set oredRec = oredMail.Recipients.AddEx("John Vink",
"(e-mail address removed)", "SMTP")
Debug.Print "recip " & oredRec.Name & " in adress book?: " &
oredRec.Resolved
//returns: 'recip John Vink in adress book?: True'
oredDL.AddMember oredRec
oredDL.Save
========

I have also tried:
- explicitly calling: oredRec.Resolve
- using 'oredDL.AddMembers oredMail.Recipients' instead of
'oredDL.AddMember oredRec'
nothing works. I have also tried with the other email address for this
contact and I tried a contact with only one email address but all to no
avail.
How is it possible that although oredRec.Resolved returns TRUE the contacts
are still one-offed in the DL? Opening the DL item opens a small 'email
properties' dialog; not the contact inspector.

Ronald van Aalten
 
If you are using AddMemberEx, you by definition create a one-off member
(since you specify address, name and address type, *not* the entry id).
If you are using AddMember and pass a recipient which is resolved to a
contact, then you will get a member that points to an existing contact.

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