c# - Microsoft.Office.Interop.Word : where is the default version defined when multiple versions of Word are installed?

标签 c# ms-word office-interop

我的计算机上安装了多个版本的 Word(Word03 和 Word07)。目前 Word07 被设置为默认版本(我也在 Windows 注册表中检查过)。
在 C# 项目中,我通过引用 Microsoft Word 12.0 对象库来使用 Microsoft.Office.Interop.Word 库。
但是当我通过调用

创建一个新的应用程序时
Application app = new Application();

无论如何都使用版本 11.0 (Word03)。所以我想知道在创建新应用程序时使用的默认版本在哪里定义。

最佳答案

当你添加一个引用时,你会在那里找到它 即它必须像 8.0 或接近这个数字(对于 2003 版本) 所以首先删除 12.0 版本的引用,然后添加一个 提到了较小的版本

关于c# - Microsoft.Office.Interop.Word : where is the default version defined when multiple versions of Word are installed?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14935472/

相关文章:

C# 方法解析,long 与 int

C# 打印机属性 WMI

r - 如何使用 Rmarkdown 在 Word 中将列表打印为项目符号项

vba - 如何在 Word 2007 VBA 中访问某种 OnLoad 事件?

c# - 当我运行刺激胃口的应用程序时,R.NET 崩溃了

c# - 没有注册类型 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' 的服务

vba - VBA : remote server machine not found 中的错误 462

c# - 对通过 OpenXML 与 Microsoft Word 通信的应用程序进行单元测试

c# - VSTO Outlook 插件需要保存设置,最好的方法是什么?

c# - 在 C# 中访问打开的 Excel 工作簿