View Single Post
  #1  
Old January 9th 06, 11:18 AM posted to microsoft.public.outlook.program_addins
Simone
external usenet poster
 
Posts: 5
Default Operation failed in Bcc field

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