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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook.ApplicationClass.CreateItem: "The operation failed."



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 26th 06, 12:22 AM posted to microsoft.public.outlook.program_vba
Bruce Wood
external usenet poster
 
Posts: 2
Default Outlook.ApplicationClass.CreateItem: "The operation failed."

I have a problem that is driving us bonkers here. We've tried any
number of workarounds and haven't been able to find a solution.

I've written a specialized print preview dialog that allows the user to
e-mail a report by choosing a menu item. Because I want the user to
fill in the destination name and e-mail subject, I call Outlook and pop
a message dialog. To do this, I call the
Outlook.ApplicationClass.CreateItem method that takes an OlItemType,
which I pass as MailItem.

This works for almost all users. However, for _some_ users, it fails
with a message:

System.Runtime.InteropService.COMException (0x841300003): The operation
failed.
at Outlook.ApplicationClass.CreateItem

These users report the failure as consistent: they say that they can
_never_ e-mail a report. It _always_ fails with this message. Other
users use the feature with no problems. I've tried everything I know to
even find out why this problem occurs for some people and not others.
We can't see the pattern, and none of my shot-in-the-dark attempts have
worked.

My app is written in C#, but I've seen the same error message cropping
up from time to time in this newsgroup, and you guys are the Outlook
gurus, so I figured I'd ask here. So far we've tried changing the
version of Outlook we call through the interop (didn't help). We also
tried catching the exception, waiting a few seconds, and then retrying.
That didn't help, either.

Our app is running on Citrix running Windows Server 2003. Both the RTM
and SP1 versions have the same problem. We are running Office 2003 SP2
with all hotfixes installed.

Ads
  #2  
Old January 26th 06, 02:44 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook.ApplicationClass.CreateItem: "The operation failed."

If you get an error from a CreateObject("Outlook.Application") code statement, the cause may be an anti-virus program on your computer that has a feature to block Outlook scripting. The solution is to turn off the script blocking feature.

If you're using Symantec Anti Virus, make a backup of the Windows registry, and then see if these changes solve the problem:

1. Go to the HKEY_CLASSES_ROOT\Outlook.Application\CLSID key and note the (Default) value. It will be a GUID, most likely {0006F03A-0000-0000-C000-000000000046}.

2. Now go to the key HKEY_CLASSES_ROOT\CLSID\{0006F03A-0000-0000-C000-000000000046}\InprocServer32 key, using the value from Step 1 if it's different from that shown above.

3. For the (Default) for that key, you should see this value:

C:\Program Files\Common Files\Symantec Shared\Script Blocking\ScrBlock.dll

Delete that text, so that the key's (Default) value becomes (value not set)

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Bruce Wood" wrote in message oups.com...
I have a problem that is driving us bonkers here. We've tried any
number of workarounds and haven't been able to find a solution.

I've written a specialized print preview dialog that allows the user to
e-mail a report by choosing a menu item. Because I want the user to
fill in the destination name and e-mail subject, I call Outlook and pop
a message dialog. To do this, I call the
Outlook.ApplicationClass.CreateItem method that takes an OlItemType,
which I pass as MailItem.

This works for almost all users. However, for _some_ users, it fails
with a message:

System.Runtime.InteropService.COMException (0x841300003): The operation
failed.
at Outlook.ApplicationClass.CreateItem

These users report the failure as consistent: they say that they can
_never_ e-mail a report. It _always_ fails with this message. Other
users use the feature with no problems. I've tried everything I know to
even find out why this problem occurs for some people and not others.
We can't see the pattern, and none of my shot-in-the-dark attempts have
worked.

My app is written in C#, but I've seen the same error message cropping
up from time to time in this newsgroup, and you guys are the Outlook
gurus, so I figured I'd ask here. So far we've tried changing the
version of Outlook we call through the interop (didn't help). We also
tried catching the exception, waiting a few seconds, and then retrying.
That didn't help, either.

Our app is running on Citrix running Windows Server 2003. Both the RTM
and SP1 versions have the same problem. We are running Office 2003 SP2
with all hotfixes installed.

  #3  
Old February 1st 06, 01:12 AM posted to microsoft.public.outlook.program_vba
Bruce Wood
external usenet poster
 
Posts: 2
Default Outlook.ApplicationClass.CreateItem: "The operation failed."

Thanks for the tip. Unfortunately, we're using Sophos, not Symantec,
and according to our admin guy, "Sophos doesn't do that." He checked
out the relevant registry keys, and they are still set to the
defaults... no evidence of script blocking.

We're going to escalate this to Microsoft. I just figured I'd post to
thank you (and see if you had any other ideas.

 




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
Outlook 2002 "The operation Failed" when clicking Send/Receive Douglas Hay Outlook - General Queries 2 March 6th 06 04:34 PM
"Form Load Failed" error in Outlook 2003! TC Outlook - Using Forms 0 February 21st 06 11:52 PM
I cannot receive mail using Outlook - error "The operation failed. phil Outlook - Installation 0 February 14th 06 10:38 PM
can't send/receive in OL2003. "operation failed. object missing" sk Outlook - Installation 0 January 26th 06 01:40 PM


All times are GMT +1. The time now is 06:19 PM.


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