简体   繁体   English

无法使用Microsoft.Office.Interop.Word

[英]cannot use Microsoft.Office.Interop.Word

I'm trying to use the namespace Microsoft.Office.Interop.Word and implement the code here 我正在尝试使用命名空间Microsoft.Office.Interop.Word并在此处实现代码

But Office is marked with a zig-zag red line as a not identified type 但是Office用锯齿形的红线标记为未识别的类型

Any one know how should I include this library ? 有谁知道我应该如何包含这个库?

You can get and include the interop assemblies from here: 您可以从此处获取并包含互操作程序集:

http://www.microsoft.com/en-us/download/details.aspx?id=3508 http://www.microsoft.com/en-us/download/details.aspx?id=3508

You need to add a reference in your project. 您需要在项目中添加参考。 Go to Solution Explorer, right-click "References", choose "Add reference..." and pick the appropiate reference, eg Microsoft.Office.Interop.Word. 转到解决方案资源管理器,右键单击“参考”,选择“添加参考...”,然后选择适当的参考,例如Microsoft.Office.Interop.Word。

您应该在计算机上安装Microsoft Office

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM