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

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

Guest

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
 
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
 
Thanks,

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

sam
 
Back
Top