00020970-0000-0000-C000-000000000046
00020970-0000-0000-C000-000000000046
?
System.InvalidCastException: 無(wú)法將類型為“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 對(duì)象強(qiáng)制轉(zhuǎn)換為接口類型“Microsoft.Office.Interop.Word._Application”。此操作失敗的原因是對(duì) IID 為“{00020970-0000-0000-C000-000000000046}”的接口的 COM 組件調(diào)用 QueryInterface 因以下錯(cuò)誤而失敗: 不支持此接口 (異常來(lái)自 HRESULT:0x80004002 (E_NOINTERFACE))。
?
?
用C#寫了一個(gè)操作Word的程序,本機(jī)測(cè)試沒(méi)問(wèn)題。拿到一個(gè)虛擬機(jī)下面的XP里面進(jìn)行兼容性測(cè)試,發(fā)現(xiàn)有這個(gè)報(bào)錯(cuò):
InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.Word.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Word._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00020970-0000-0000-C000-000000000046}’ failed due to the following error: 加載類型庫(kù)/DLL 時(shí)出錯(cuò)
?
打開(kāi)注冊(cè)表:搜索:00020970-0000-0000-C000-000000000046
刪除:下面兩項(xiàng)8.3, 8.4。8.3是Office 2003, 8.4是Office 2007的。將8.4分支刪除。程序運(yùn)行正常!
以上方法還是不行。
最終決方法:
打開(kāi)注冊(cè)表搜索:{00020905-0000-0000-C000-000000000046}
刪除 8.5
?
?
?
轉(zhuǎn)載于:https://www.cnblogs.com/vienna/p/3608926.html
總結(jié)
以上是生活随笔為你收集整理的00020970-0000-0000-C000-000000000046的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 2008技术内幕:T-SQL语言基础 联
- 下一篇: 微信相关的应用