Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SAm - 27 Aug 2007 16:16 GMT
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
Ken Slovak - [MVP - Outlook] - 27 Aug 2007 16:35 GMT
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

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi
>
[quoted text clipped - 12 lines]
>
> Sam
SAm - 27 Aug 2007 19:40 GMT
Thanks,

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

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
[quoted text clipped - 32 lines]
> >
> > Sam
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.