A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Operation failed in Bcc field



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 9th 06, 12:18 PM 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
  #2  
Old January 11th 06, 08:15 AM posted to microsoft.public.outlook.program_addins
Sachin Sancheti
external usenet poster
 
Posts: 7
Default Operation failed in Bcc field

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  
Old January 11th 06, 09:27 AM posted to microsoft.public.outlook.program_addins
Simone
external usenet poster
 
Posts: 5
Default Operation failed in Bcc field

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.