Redemption and CC Field

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.
 
S

Sue Mosher [MVP-Outlook]

There is no CC.Add method. You use Recipients.Add and then set the
Recipient.Type property to olCC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top