Redemption - multiple emails for cc - error: could not resolve ema

S

SAm

Hi

I am using Redemption in my VBA(in Microsoft Access) to send email via
outlook. I have a (Access) form that has two textboxes, one for To and one
for CC. the To has one email address, and the cc had two or three email
addresses. I get an error "could not resolve email address..." if i have more
than one email address. i use a semi-colon to seperate email addresses, and i
end the last email address with a semi colon.

can someone tell me what i can do to resolve this?

thanks,

Sam
 
K

Ken Slovak - [MVP - Outlook]

Use the Recipients collection of the item and add each Recipient object one
at a time. To set them as To or Cc use Recipient.Type = olTo or
Recipient.Type = olCC.

When you add a Recipient object you can then resolve it and test for
success:

Dim oRecip As Outlook.Recipient
Dim colRecips As Outlook.Recipients

Set colRecips = item.Recipients
Set oRecip = colRecips.Add("some email address")
If Not (oRecip Is Nothing) Then
oRecip.Type = olTo
oRecip.Resolve
If Not oRecip.Resolved Then
MsgBox "Could not resolve recipient " & "some email address"
End If
End If
 
S

SAm

Thanks,

I used the split function and a for loop to go through all of the email
addresses. now it works fine.

sam
 

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