本文介绍了在哪里可以找到Microsoft.Office.Interop.Word.dll(2010)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了一个我要编译的.NET项目的源代码.虽然,该项目使用Office 2010中的引用(命名空间)Microsoft.Office.Interop.Word,但在任何地方都找不到.我能够下载文件microsoft.office.interop.word.dll,但显然可以从Office 2007下载该文件,因为它仍无法编译,因为该项目使用功能Document.SaveAs2(来自Office 2010库).我的计算机上装有Office 2007,而台式机则为Visual Studio 2012 Express.

I got the sources of a .NET project that I am trying to compile. Although, the project uses the reference (namespace) Microsoft.Office.Interop.Word from Office 2010 that I cannot find anywhere.I was able to download the file microsoft.office.interop.word.dll but apparently the one from Office 2007 since it still doesn't compile because the project uses the function Document.SaveAs2 (which is from Office 2010 library).I have Office 2007 on my computer and Visual Studio 2012 Express for Desktop.

能否请您解释一下这是如何工作的?我怎么能下载该dll,但无法从Office 2010中找到该dll.为什么我的客户端能够在没有此dll的情况下编译projet?如果在编译时安装了Visual Studio,Visual Studio是否会自动连接"到Microsoft Office库?

Could you please explain me how this works? How come was I able to download the dll but I cannot find the one from Office 2010. How come my client was able to compile the projet without this dll? Does Visual Studio automatically "connects" to the Microsoft Office libraries if installed when compiling ?

谢谢您的帮助.

推荐答案

如果正确安装了程序集,则您不应该自己在本地系统上搜索dll.有关如何在不安装Office的情况下下载和安装Office互操作库的信息,请参见以下链接.第二个链接详细介绍了如何将程序集正确添加到您的项目中.

You shouldn't be searching for the dll on your local system yourself if you installed the assemblies correctly. See following link for information on how to download and install office interop libraries without installing office. Second link details how to add the assemblies to your project correctly.

安装Office主互操作程序集

办公室主互操作程序集

作为进一步参考,这里有一些图片,详细说明了如何正确添加dll:

For a further reference here are some pictures detailing how to add the dll correctly:

在您的项目中,右键单击参考",然后选择添加",然后选择参考".

In your project, right-click on "References" and select "Add" and then "Reference".

接下来,在引用管理器中选择扩展名",滚动查找正确的dll.对于Microsoft.Office.Interop.Word.dll,Office 2010是版本14.

Next select "Extensions" in the Reference Manager, scroll to find the correct dll. Which for Microsoft.Office.Interop.Word.dll Office 2010 is the version 14 one.

这篇关于在哪里可以找到Microsoft.Office.Interop.Word.dll(2010)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 21:27