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

6

17

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.

Isom answered 9/3, 2015 at 14:24 Comment(4)
you should install office 2010.Publicspirited
are you familiar with hot to add references..? right click on the reference node.. click add Reference got to COM node on the left and look for Microsoft.Office , or try adding the using Microsoft.Interop.Office name spaceTullusus
I eventually installed Office 2010 but still cannot resolve my issue. That is because I have using Microsoft.Office.Interop.Word; but didn't add the reference that I get an compilation error. I tried adding the reference as you suggest MethodMan, but I cannot find any Microsoft.Office... Thank you for your help.Isom
Take a look at this nuget packageHialeah
O
16

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

Ophelia answered 9/3, 2015 at 14:55 Comment(10)
Thank you for your clear answer Slowbrochacho. So I have got Office 2010 installed, I downloaded, extracted and installed the Primary Interop Assemblies but I still cannot find the Microsoft.Office.Interop.Word in the references under Assemblies/Extensions. How would you explain this? Thank youIsom
Run the following command in your VS studio command line, "gacutil /l Microsoft.Office.Interop.Word" to see if the dll is loading in your global assembly cache.Ophelia
It seems good. I guess I have got the version for Office 2007 (still installed and the one for 2010) ? See here : img11.hostingpics.net/pics/…Isom
Check in the reference manager in your project under COM -> Type Libraries for "Microsoft Word 15.0 Object Library" as well to make sure that the COM references are correct.Ophelia
I have not Microsoft Word 15.0 Object Library but the 14.0. Although I have Microsoft Office 15.0 Object Library. Thank youIsom
It seems to work if I add Microsoft word 14.0. It adds a reference Microsoft.Office.Interop.Word. Is this the same as adding the reference from Assembly > Extensions then Microsoft.Office.Interop.Word?Isom
Try selecting that and try to rebuild it should use the last loaded interop assembly (should be version 14 since you just installed office) from your GAC, this is only good for building in development and shouldn't be done for deployment purposes.Ophelia
How can this be an issue if I build the app like this for production deployement purpose?Isom
I should probably double check on this but, I am pretty sure that if you reference a dll in your systems GAC it will look for the dll on the clients system's GAC and if they don't have the assemblies installed or registered or have an incorrect version as the last loaded dll then your application won't work so, it is a good idea to provide the assemblies with your redistributable or have the install procedure download and install the dlls into the client's GAC.Ophelia
It can be also found at this location C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIACloudless
M
3

Install via nuget Microsoft.Office.Interop.Word.

Maracaibo answered 19/7, 2018 at 20:31 Comment(1)
Caution! this package is great but not created by Microsoft and doesn't support Office 14 (2010). Just worth notingCircumfuse
N
2

Now that Visual Studio 2019 is out, you can install Microsoft Office interop libraries as part of an optional bundled component called Visual Studio Tools for Office (VSTO).

Microsoft have made this super easier, and you don't need to reference them in the GAC!

Neddy answered 7/5, 2019 at 4:34 Comment(1)
beware that will install a lot of other stuff also. Is it relevant, I don't knowOvid
H
1

If you have Office 2016 installed, you can get the file Microsoft.Office.Interop.Word.dll here:

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Word.dll

Heddie answered 19/10, 2020 at 13:0 Comment(0)
I
0

I manage to get the Microsoft.Office.Interop extensions listed in the suggested references after installing the Office Tools Bundle installer for VS2012 available here: http://blogs.msdn.com/b/somasegar/archive/2013/03/04/now-available-office-developer-tools-for-visual-studio-2012.aspx

Isom answered 9/3, 2015 at 16:47 Comment(0)
G
0

On my system it can be found in C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\*.0.0.0__*\Microsoft.Office.Interop.Word.dll

Note that this is not in C:\Windows\Microsoft.NET where it is expected by newer .NET versions (also affecting pwsh Core)

Gaspar answered 8/9, 2023 at 16:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.