![]() |
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
|
|||
|
|||
![]()
Hello all,
I have the following code but I can not seemt to get it working. I am still missing something very basic. Sue you will see this is still mostly the code you gave me. I am just trying to add my email address to the recipients collection if it is not already there. My problem is it goes to everyone in the collection but me. By the way your book should arrive at my house tomorrow. ![]() Function Item_Send() Dim blnOKToSend blnOKToSend = False For Each recip in Item.Recipients MsgBox "The current recip is: " & recip.Address If recip.Address = "/o=BP/ou=USAHOU/cn=Users/cn=rilej3" Then blnOKToSend = True Exit For End If Next If blnOKToSend = False Then ") blnOKToSend = True MsgBox "The current to list is: " & Item.To End If Item_Send = False End Function |
#2
|
|||
|
|||
![]()
Does it work better if you instantiate a Recipient object and then resolve
it? Set oRecip = ") oRecip.Resolve -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm " wrote in message ... Hello all, I have the following code but I can not seemt to get it working. I am still missing something very basic. Sue you will see this is still mostly the code you gave me. I am just trying to add my email address to the recipients collection if it is not already there. My problem is it goes to everyone in the collection but me. By the way your book should arrive at my house tomorrow. ![]() Function Item_Send() Dim blnOKToSend blnOKToSend = False For Each recip in Item.Recipients MsgBox "The current recip is: " & recip.Address If recip.Address = "/o=BP/ou=USAHOU/cn=Users/cn=rilej3" Then blnOKToSend = True Exit For End If Next If blnOKToSend = False Then ") blnOKToSend = True MsgBox "The current to list is: " & Item.To End If Item_Send = False End Function |
#3
|
|||
|
|||
![]()
Ken,
Thank you so very much. That was the piece I was missing. It is working great now. Thank you, Jeff Riley "Ken Slovak - [MVP - Outlook]" wrote: Does it work better if you instantiate a Recipient object and then resolve it? Set oRecip = ") oRecip.Resolve -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm " wrote in message ... Hello all, I have the following code but I can not seemt to get it working. I am still missing something very basic. Sue you will see this is still mostly the code you gave me. I am just trying to add my email address to the recipients collection if it is not already there. My problem is it goes to everyone in the collection but me. By the way your book should arrive at my house tomorrow. ![]() Function Item_Send() Dim blnOKToSend blnOKToSend = False For Each recip in Item.Recipients MsgBox "The current recip is: " & recip.Address If recip.Address = "/o=BP/ou=USAHOU/cn=Users/cn=rilej3" Then blnOKToSend = True Exit For End If Next If blnOKToSend = False Then ") blnOKToSend = True MsgBox "The current to list is: " & Item.To End If Item_Send = False End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add Custom Header Mail Item | [email protected] | Outlook - General Queries | 2 | April 4th 06 10:45 AM |
How to add Custom Header to Mail Item | racni | Add-ins for Outlook | 2 | April 4th 06 10:36 AM |
Item.Recipients.Add | Ian Sweeney | Outlook and VBA | 5 | March 23rd 06 10:27 PM |
How do I add an item that isn't an appointment? | smags | Outlook - Calandaring | 1 | March 22nd 06 06:35 PM |
add toolbar in inspector contact item | Irene | Outlook and VBA | 1 | February 24th 06 09:23 PM |