在参考列表中找不到 Microsoft.Office.Interop.Word [英] Can't locate Microsoft.Office.Interop.Word in Reference List

查看:40
本文介绍了在参考列表中找不到 Microsoft.Office.Interop.Word的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我不知道如何将 MS Word 与 C# 集成,所以我得到了这个解决方案:http://www.dotnetperls.com/word

I was given this solution to a problem I had, since I didn't know how to integrate MS Word with C#: http://www.dotnetperls.com/word

我研究了这个解决方案,但在参考列表中找不到 Microsoft.Office.Interop.Word.我也无法在 COM 对象下找到它.我错过了什么?我使用的是 Visual Studio Express 2012.

I looked into this solution, and I can't locate Microsoft.Office.Interop.Word in the reference list. I can't find it under COM Objects either. What am I missing? I am using Visual Studio Express 2012.

这个问题的答案是您必须在您的计算机上安装 MS Office.

The answer to this question is that you HAVE to install MS Office on your computer.

推荐答案

如果您在办公室安装期间没有选择安装这些程序集,您可能需要单独安装它们.

you might need to install the assemblies separately,if you did not choose to install them during your office installation.

MSDN:

您必须安装 Microsoft Office 主要互操作程序集(PIA) 在您的开发计算机的全局程序集缓存中在您可以执行某些开发任务之前.通常,PIA安装 Office 时会自动安装开发计算机.但是,在某些情况下,您可能需要安装单独的 PIA.

You must install the Microsoft Office primary interop assemblies (PIAs) in the global assembly cache of your development computer before you can perform certain development tasks. Typically, the PIAs are installed automatically when you install Office on the development computer. However, in some cases you might need to install the PIAs separately.

更多信息在这里

这篇关于在参考列表中找不到 Microsoft.Office.Interop.Word的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆