Item.Recipients.Add Not Working for me

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have the following code but I can not seemt to get it working. I am still
missing something very basic. Sue you will see this is still mostly the code
you gave me. I am just trying to add my email address to the recipients
collection if it is not already there. My problem is it goes to everyone in
the collection but me. By the way your book should arrive at my house
tomorrow. ;) Thanks in advance.

Function Item_Send()
Dim blnOKToSend
blnOKToSend = False
For Each recip in Item.Recipients
MsgBox "The current recip is: " & recip.Address
If recip.Address = "/o=BP/ou=USAHOU/cn=Users/cn=rilej3" Then
blnOKToSend = True
Exit For
End If
Next
If blnOKToSend = False Then
Item.Recipients.Add("(e-mail address removed)")
blnOKToSend = True
MsgBox "The current to list is: " & Item.To
End If
Item_Send = False
End Function
 
Does it work better if you instantiate a Recipient object and then resolve
it?

Set oRecip = Item.Recipients.Add("(e-mail address removed)")
oRecip.Resolve
 
Ken,

Thank you so very much. That was the piece I was missing. It is working
great now.

Thank you,
Jeff Riley
 
Back
Top