![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 -- 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 "SAm" wrote in message ... 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 |
#3
|
|||
|
|||
![]()
Thanks,
I used the split function and a for loop to go through all of the email addresses. now it works fine. sam "Ken Slovak - [MVP - Outlook]" wrote: 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 -- 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 "SAm" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how do i resolve 553 smtp error in outlook 2003 | absolute office | Outlook - Installation | 1 | July 7th 07 03:51 PM |
absolutely cannot resolve timeout error | stef | Outlook - Installation | 12 | September 27th 06 01:51 AM |
absolutely cannot resolve timeout error | stef | Outlook - General Queries | 4 | September 23rd 06 09:13 PM |
How do I resolve desktop error code 85010014? | Mia | Outlook and VBA | 0 | June 15th 06 04:31 PM |
How to resolve error message 0X8004210A | grneyeldy1966 | Outlook - Installation | 1 | March 29th 06 04:32 AM |