Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find Microsoft.Office.Interop.Word.dll (2010)?

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.

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 ?

Thank you for your help.

like image 630
mentinet Avatar asked Mar 09 '15 14:03

mentinet


People also ask

Can Microsoft Office Interop Word DLL work without installing Office?

You cannot use the Interop libraries without Office installed. This is a requirement from Microsoft, so even if you figured out how to do it you would be violating the EULA. There are alternatives (Aspose, OOXML SDK, etc.) that might be useful but to use Interop on the server, you need to install Office.

What is Microsoft 2010 primary interop assemblies used for?

To use the features of a Microsoft Office application from an Office project, you must use the primary interop assembly (PIA) for the application. The PIA enables managed code to interact with a Microsoft Office application's COM-based object model.

What is Microsoft Office Interop?

Microsoft Office Interop (Excel Automation) is an option when creating/reading Excel files (XLS, XLSX, CSV) from C# or VB.NET application, but it has many drawbacks.


1 Answers

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.

Install Office Primary Interop Assemblies

Office Primary Interop Assemblies

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".

Add References

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.

Add dll

like image 193
Bilal Bashir Avatar answered Oct 02 '22 20:10

Bilal Bashir