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.
wattostudios
8,64613 gold badges43 silver badges57 bronze badges
asked Mar 9, 2015 at 14:24
4
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».
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.
answered Mar 9, 2015 at 14:55
Bilal BashirBilal Bashir
1,43314 silver badges18 bronze badges
10
answered Jul 19, 2018 at 20:31
Matheus MirandaMatheus Miranda
1,7352 gold badges20 silver badges36 bronze badges
1
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!
answered May 7, 2019 at 4:34
CrazyTimCrazyTim
6,5476 gold badges33 silver badges55 bronze badges
1
If you have Office 2016 installed, you can get the file Microsoft.Office.Interop.Word.dll here:
C:Program Files (x86)Microsoft Visual StudioSharedVisual Studio Tools for OfficePIAOffice15Microsoft.Office.Interop.Word.dll
answered Oct 19, 2020 at 13:00
Первым делом:
Скачайте библиотеку — скачать microsoft.office.interop.word.dll
Затем:
Поместите microsoft.office.interop.word.dll
в одну из следующих папок:
Если у вас 64-битная версия Windows, то поместите файл в:
«C:WindowsSysWOW64»
Если у вас 32-битная версия Windows, то поместите файл в:
«C:WindowsSystem32»
После этого
Перезагрузите компьютер, чтобы изменения вступили в силу.
Всё равно выдаёт ошибку microsoft.office.interop.word.dll
не был найден?
Тогда придётся установить этот файл вручную. Для этого:
Зайдите в меню «Пуск».
В строчке поиска введите «cmd». И запустите найденную программу от имени администратора.
В открывшемся окне введите «regsvr32 microsoft.office.interop.word.dll
«.
После этого снова перезагрузите компьютер. Теперь ошибка должна быть исправлена.
Если что-то не понятно прочитайте более подробную инструкцию — как установить dll файл.
-
README
-
Frameworks
-
Dependencies
-
Used By
-
Versions
This an assembly you can use for Word 2013/2016/2019 COM interop, generated and signed by Microsoft. This is entirely unsupported and there is no license since it is a repackaging of Office assemblies.
Product | Versions |
---|---|
.NET |
net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core |
netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard |
netstandard2.0 netstandard2.1 |
.NET Framework |
net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen |
tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETFramework 2.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (28)
Showing the top 5 NuGet packages that depend on Microsoft.Office.Interop.Word:
Package | Downloads |
---|---|
fion.modelerp.core ModelErp |
112.2K |
MyLibery.dll Some useful function. |
16.3K |
WebForms.DocumentViewer WebFormsDocumentViewer is a simple custom control that lets you embed documents (PDF, Word, PowerPoint, Excel, RichTextFormat and Text) in your ASP.NET WebForms pages. |
9.6K |
BalaReva.Word.Activities This package contains the below Activities. |
8.8K |
Ns.Microsoft.Office.Interop.All Microsoft.Office.Interop.All 15.0.0.2 |
7.0K |
GitHub repositories (7)
Showing the top 5 popular GitHub repositories that depend on Microsoft.Office.Interop.Word:
Repository | Stars |
---|---|
greenshot/greenshot Greenshot for Windows — Report bugs & features go here: https://greenshot.atlassian.net or look for information on: |
3.3K |
Tichau/FileConverter File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in windows explorer. |
2.6K |
saucepleez/taskt taskt (pronounced ‘tasked’ and formely sharpRPA) is free and open-source robotic process automation (rpa) built in C# powered by the .NET Framework |
802 |
MicrosoftTranslator/DocumentTranslator-Legacy Microsoft Document Translator (Archive) — Replaced by the MicrosoftTranslator/DocumentTranslation project in this repository. |
400 |
cmu-sei/GHOSTS GHOSTS is a realistic user simulation framework for cyber simulation, training, and exercise |
296 |
- Remove From My Forums
-
Question
-
User1075616431 posted
Hi,
I am almost ready to put my next app on the web… Word reports are a big part of it…
But the current webhost does not have/want to install word/office files on server.(GAC…)
Is it possible to just include a Microsoft.Office.Interop.Word.dll in my BIN folder?
If so, where can I find that file? (link anyone? I do not want O2003PIA.exe installation, JUST THE DLL !? can’t find it anywhere)
Regards,
NNM
All replies
-
User-820230059 posted
I’m not sure — A moderator could probably answer you better; as they may have information they can directly access but here’s my guess.
The dll is licensed with the product — you’re allowed to use the dll with the product, or for «extensibility» with the product (in this case office). I would seriously doubt you are allowed to redistribute that dll to your web application — on a host
that doesnt have that product installed. If word reports are a big part of your application, then you are basically saying that the «System Requirments» include needing word installed, so you have the dll in the GAC.Of course this is just a guess, but my feeling is — you may need another solution, you obviously dont want anywhere you host it, to have to install word just to run you’re web application…maybe you do.
As you mentioned…you’re other option is to install the Microsoft Primary Interop Assemblies — which are available for download for this reason.
http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx
You can find information about it at that link.
-
User1651409590 posted
Hi
Did you find solution for that.
I am facing the same problem, and I do not know if I am allowed to distribute the dll with my application.
Thanks
Salman
-
User1075616431 posted
I have no idea if you can or not…
In my case, I just made a vb class that doesn’t require any server side dll files.
Two, actually: one for office2003+ (write in wordml) or old versions (write in html)..
Downside: client (user) has to have office on his computer.
-
User-1789103342 posted
open a new test project.
In your solution explorer right click on the project name > click on Add Reference > .Net Tab > Select «Microsoft.Office.Interop.Word» (version 11 for 2003) and say ok
Open a new file and type
Imports Microsoft.Office.Interop.Word
It should work
-
User1075616431 posted
But is it (legally) allowed?
It gives your application the power to generate MS word documents.. Does it need it’s own license, or..?!
-
User-1386145889 posted
It only gives your application the power to talk to an existing MS Word installation to generate documents. You need to have a licensed copy of MS Word installed on any computer you want this to work for.
You may be able to resolve missing or corrupted .dll errors by downloading and installing Microsoft.Office.Interop.Word.dll.
Download Microsoft.Office.Interop.Word.dll
Select the version or variant you wish to download.
Version
Size
Microsoft.Office.Interop.Word.dll
by Microsoft Corporation
for Microsoft Office 2013
Microsoft.Office.Interop.Word
- Version
- 15.0.4603.1000
- Language
- 1033 (U.S. English)
- SHA1
- 66a41958ead9151d7e61d690f12006ca8a40df89
- MD5
- be6f4fd7365dfa124d60114095380602
918.7KB
Microsoft.Office.Interop.Word.dll
by Microsoft Corporation
for Microsoft Office 2013
Microsoft.Office.Interop.Word
- Version
- 15.0.4420.1017
- Language
- 1033 (U.S. English)
- SHA1
- 2341eaddb555330282d352023a6913fcf3aeca8f
- MD5
- 334c407299e2e5de0ac67fbca3bdbca7
918.6KB
Microsoft.Office.Interop.Word.dll
by Microsoft Corporation
for Microsoft Office 2010
Microsoft.Office.Interop.Word
- Version
- 14.0.4762.1000
- Language
- 1033 (U.S. English)
- SHA1
- 7fdb0bd14da2f2daf22ba690ce759f5fc19f4dee
- MD5
- 386cc49f35be2a90e2e3339619102bf3
885.9KB
About Microsoft.Office.Interop.Word.dll Errors
When you use a program on your computer, it may need to use a specific file called «Microsoft.Office.Interop.Word.dll». This .dll file contains important instructions that the program needs to work correctly.
When you open the program, your computer will look in two specific places to find the .dll file. First, it will look in the folder where the program is installed on your computer. Second, it will look in a system folder on your computer called «System32» and/or «SysWOW64».
If your computer cannot find the «Microsoft.Office.Interop.Word.dll» file in either of these two places, you may see an error message that says the file is missing. This can cause the program to not work properly or to not open at all.
How to Fix Microsoft.Office.Interop.Word.dll Errors
- Re-Install the application that requires Microsoft.Office.Interop.Word.dll.
- Update the application to the latest version.
- Install all Windows updates and any available driver updates.
- Clean your PC registry and optimize your computer.
- Or, Download and restore Microsoft.Office.Interop.Word.dll
-
Launch the DLL Wizard for step by step instructions.
Windows PC .DLL Errors
-
This application has failed to start because Microsoft.Office.Interop.Word.dll was not found.
Re-installing the application may fix this problem.
- Microsoft.Office.Interop.Word.dll Not Found.