Mallikarjun Kalkere

hi all,

We are developing a com addin for outlook 2002 using c#.

for all our customers it is working fine except for one.
in his machine he is getting the following error.

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))


we are not able to make out what exactly the problem is.

can any one please help.


Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

Geoff Darst - MSFT

Hi,

Sounds like you have a problem with your typelib registration. Presumably, the Com interop layer is hitting the registry to try to locate the typelib. It would start by looking under HKCR\Interface\{00063001-0000-0000-C000-000000000046}\Typelib. The default value should refer to the guid for the typelib that defines the interface in question: which should be located under the following key: HKCR\Typelib\{00062FFF-0000-0000-C000-000000000046}. There should be a version subkey and then a 0 subkey, and a win32 subkey under that. The default value of the win32 key should point to the typelib (which is msoutl.olb).

I'd start by checking your Office directory for msoutl.olb. If it is there, try running 'regtlib msoutl.olb'. You should have regtlib on your machine is part of your Visual Studio install, I believe. Anyway, reregistering the typelib will rewrite all of the necessary keys to the registry. You will need administrative privileges for this operation.

The other possibility is that msoutl.olb itself is corrupt, in which case reinstalling Outlook should fix the problem.

Sincerely,

Geoff Darst

Microsoft VSTO Team





Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

_Rob_

I am getting the same error

Could not access Outlook on this computer (Create Object Failed) - Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Outlook.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I tried running the regtlib command as you suggested, and got a response indicating that it was successful; however the problem remains <even after a reboot>.

Any other suggestions short of reinstalling Outlook <Outlook appears to be running fine notwithstanding this problem with my visual studio program>

Thanks, Rob

July 20th, 2007





Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

_Rob_

I was able to resolve this myself by running a program that came with Outlook - C:\Program Files\Common Files\System\MSMAPI\1033\Scanpst.exe

for more information please see this site:

http://www.emailaddressmanager.com/outlook/repair.html

Rob

www.callclerk.com

www.arulerforwindows.com

July 25th, 2007





Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

amogh.gr

Hello Sir,
I am trying to sync Outlook 2000 contacts with Vista using C#. But while opening a session in Outlook 2000 with the following statement of code

ns = app.GetNamespace("MAPI");

I am getting a COM exception which is as follows:

Unable to cast COM object of type 'Outlook.ApplicationClass' to interface type 'Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I am unable to read Outlook Contacts and the application gets crashed. I ran Outlook Inbox Repair Tool and repaired the Outlook.pst file. I also copied the wab32.dll and wab32res.dll into

C:\Windows\System32 folder, but still I am getting the crash. Can you please guide me in this regard Thanks a lot in advance.


Thanks and Regards
Amogh G.R.




Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

Kulvinder

Hi,

I am also getting the CANTLOADLIBRARAY Exception and i have tried everything written in this post but still no help.

Any workaround

Thanks

Kulvinder Singh






Re: Visual Studio Tools for Office COM Exception with synching Outlook 2000 on Vista.

Shirish Reddy

Hi,

Mine application was running properly in Windows xp,

I did following operations,

I changed my development environment to the new system running on Windows vista.

Initially it contains office trial version of 2007 It started posing the problem,I thought of problem with 2007 dll's I did unintall office 2007 and installed office 2003. I am getting the same problem as mentioned above posts. To my surprise I deployed the application in one of the client system which is running on vista , It is running normal as other XP systems.

Why my development environment is seeing the above problem..Help me out. Thanks in advance..

Shirish