![]() |
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 everyone
I've created an AddIn for Outlook2k3 using Vb6 My AddIn use the Application_ItemSend Event to add some address in the Bcc field. This task work fine however if Bcc is already populated with a distribution list, sometimes outllook show the messagebox "The operation failed". It seems outllook cannot resolve some of the contact in the DL, if i remove them from the list before sending the mail no warning is displayed and the mail is sent correctly If i disable my AddIn and send a message to the same DL without removing contacts, no problem at all. Here is the code that add the Bcc private sub olApp_ItemSend(ByVal Item As Object, Cancel As Boolean) Item.BCC = Item.BCC & myAddress Item.Recipients.ResolveAll end sub *myAddress contain a valid mail address in exchange/outlook format, that is "Test" My code raise no exception, it seems a contact resolution problem but i cant understand why it appears only when my addin is enabled. Any help would be greatly appreciated. Many thanks Simone |
Ads |
#2
|
|||
|
|||
![]()
You could try following:
1. private sub olApp_ItemSend(ByVal Item As Object, Cancel As Boolean) Item.BCC = Item.BCC & ";" & myAddress Item.Recipients.ResolveAll end sub 2. Use Recipients collection: Dim objRec as Recipient Set objRec = Item.Recipients.Add(myAddress) objRec.Type = olBcc '3 |
#3
|
|||
|
|||
![]()
Thanks for your reply Sachin
Solution 2 works great! Thank you very much Simone "Sachin Sancheti" wrote: You could try following: 1. private sub olApp_ItemSend(ByVal Item As Object, Cancel As Boolean) Item.BCC = Item.BCC & ";" & myAddress Item.Recipients.ResolveAll end sub 2. Use Recipients collection: Dim objRec as Recipient Set objRec = Item.Recipients.Add(myAddress) objRec.Type = olBcc '3 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The operation failed. Anobject could not be found. | [email protected] | Outlook - General Queries | 1 | March 7th 06 04:23 AM |
operation failed after installation | Bob I | Outlook - Installation | 0 | February 15th 06 09:21 PM |
Operation Failed. An object could not be found | Raymon | Outlook - Installation | 0 | January 21st 06 04:26 AM |
operation failed - object could not be found | Lynne | Outlook - Installation | 1 | January 20th 06 05:01 PM |
the operation failed. the object could not be found. | ChandleyCrawford | Outlook - Installation | 0 | January 12th 06 11:05 PM |