报错

BUG反馈 · 43 次浏览
用户TNuW0hrYBAA 创建于 21天11小时前

无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。此操作失败的原因是对 IID 为“{00020970-0000-0000-C000-000000000046}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 加载类型库/DLL 时出错。 (异常来自 HRESULT:0x80029C4A (TYPE_E_CANTLOADLIBRARY))。
   在 System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
   在 Microsoft.Office.Interop.Word.ApplicationClass.get_ActiveDocument()
   在 Cesar.Office.Interop.FunctionWord.转换当前文档中选中的LaTeX公式() 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\FunctionWord.cs:行号 69
   在 Cesar.Office.Interop.Program.RunMethod(String method, IList`1 param, String app) 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\Program.cs:行号 273
   在 Cesar.Office.Interop.Program.GetOutputFromCommandLineOption(Options opts) 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\Program.cs:行号 123


回复内容
Cesar 21天11小时前
#1

不支持WPS

用户TNuW0hrYBAA 回复 Cesar 21天11小时前 :

是word的docx


Cesar 回复 用户TNuW0hrYBAA 21天11小时前 :

大概率重装office才能解决,一般都是因为没有正确安装office导致的

回复主贴