码迷,mamicode.com
首页 > 其他好文 > 详细

解决安装不同版本office后造成的PIA COM组件调用失败

时间:2014-08-10 21:39:30      阅读:611      评论:0      收藏:0      [点我收藏+]

标签:tfs   office   

症状:TF400422, TF400423, TF400424: Failed to open in Microsoft Excel (Project, Outlook): Unable to cast COM object of type ‘Microsoft.Office.Interop.Excel(Project, Outlook).ApplicationClass‘ to interface type ‘Microsoft.Office.Interop.Excel._Application‘. This operation failed because the QueryInterface call on the COM component for the interface withIID ‘{00063001-0000-0000-C000-000000000046}‘ failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))

如下图:

bubuko.com,布布扣

bubuko.com,布布扣

  • 原因:  先后安装了不同版本的office 造成系统注册表键值混乱。


解决方法:

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 HKEY_CLASSES_ROOT\Interface\{00063001-0000-0000-C000-000000000046}\Typelib.  

Removing an Office version and installing an older one, is probably what caused it. The newer version may have left some junk in the registry.
I had the same case, and this is how got over:

Notice the registry keys mentioned eariler:

HKEY_CLASSES_ROOT\Typelib\{00062FFF-0000-0000-C000-000000000046}.  There should be a version subkey 

If there is more than one version sub key (which is possible if you removed a newer version of Outlook) you should remove the one that refers to the version not installed:


解决安装不同版本office后造成的PIA COM组件调用失败,布布扣,bubuko.com

解决安装不同版本office后造成的PIA COM组件调用失败

标签:tfs   office   

原文地址:http://blog.csdn.net/songjialin/article/details/38473239

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!