Redemption and CC Field

  • Thread starter Thread starter Michael Hyatt
  • Start date Start date
M

Michael Hyatt

I am using Redemption to send a message. I am using the following code to
insure that the recipient is a valid e-mail recipient:

SafeItem.Recipients.Add strRecipient
If Not SafeItem.Recipients.ResolveAll Then
MsgBox "Not a valid recipient or e-mail address. Please fix and try
again."
txtRecipient.SetFocus
Exit Sub
End If

I would like to do the same thing with the CC field. However, I get an
error:

SafeItem.CC.Add strCC
If Not SafeItem.CC.ResolveAll Then
MsgBox "Not a valid CC recipient or e-mail address. Please fix and
try again."
txtCC.SetFocus
Exit Sub

End If

So, I add the CC recipient to the Recipients collection, and resolve it.
Then, assuming it passes, I delete the CC from the receipients collection
and assign it to SafeItem.CC. This works, but it seems like a kludge. Am I
missing something obvious?

SafeItem.Recipients.Add strRecipient
If Not SafeItem.Recipients.ResolveAll Then
MsgBox "Not a valid recipient or e-mail address. Please fix and try
again."
txtRecipient.SetFocus
Exit Sub
End If

SafeItem.Recipients.Add strCC
If Not SafeItem.Recipients.ResolveAll Then
MsgBox "Not a valid CC recipient or e-mail address. Please fix and
try again."
txtCC.SetFocus
Exit Sub
Else
SafeItem.Recipients.Remove (2)
SafeItem.CC = strCC
End If

Thanks in advance for your help.

Note: I posted this previously in microsoft.public.developer.addins and
didn't get a response, so I am posting here.
 
There is no CC.Add method. You use Recipients.Add and then set the
Recipient.Type property to olCC.
 
Back
Top