【发布时间】:2020-03-03 07:23:26
【问题描述】:
我有一个处理 Word 文档的 .Net C# 应用程序。
我正在使用Microsoft.Office.Interop.Word.dll,它是 Office 2010 的一部分,产品版本 14.0.xxx。调用:
using Microsoft.Office.Interop.Word;
...
Application app = new Application();
导致以下错误:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
我还注意到,当生成此错误时,会创建一个 WINWORD.EXE 实例并挂起,但该文件关联到 Office 365,产品版本 16.0.xxx。
我假设错误的(至少一个)来源是我正在使用的 .dll 与我的开发机器上安装的 Word 版本之间的不兼容。
问题
是否可以在服务器上不安装 Microsoft Office 的情况下执行办公自动化?
【问题讨论】:
标签: c# automation ms-office