Can't locate Microsoft.Office.Interop.Word in Reference List
Solution 1
you might need to install the assemblies separately,if you did not choose to install them during your office installation.
MSDN:
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.
Solution 2
You need Microsoft Word xx Object Library
.
Solution 3
You can download the Primary Interop Assemblies from here.
http://www.microsoft.com/en-us/download/details.aspx?id=3508
Solution 4
You may also use NuGet Package Manager in order to install the reference. Go to Project -> Manage NuGet Packages... Search for "Interop.Word" and install that package.
Good thing about it is that you don't need to think about where the dll is located. When another person will check out the solution, NuGet will get all needed packages onto their machine.
Solution 5
Check if the library (Microsoft.Office.Interop.word) is present in the assembly folder of windows (C:\Windows\assembly) else you can install it from http://www.microsoft.com/en-us/download/details.aspx?id=3508
Now you just need locate it in your visual studio.
Right click on the consoleApplication(or name of you application) in SolutionExplorer window and
Go to Add -> References-> Browse and find C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.word or similar directory. press ok and your can now use the library in your application.
Related videos on Youtube
OmniOwl
Software Developer, Indie Game Developer & Architect of Play
Updated on October 19, 2020Comments
-
OmniOwl over 3 years
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
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.EDIT:
The answer to this question is that you HAVE to install MS Office on your computer.
-
nathanchere over 10 yearsNo, actually you don't NEED to install office. This answer stackoverflow.com/a/19572022/243557 is more correct than the one you have marked.
-
Kosmo零 almost 8 years@nathanchere - No, actually we NEED to install office. That PIAs junk does nothing. No needed COm libs appears where they should.
-
-
OmniOwl about 11 yearsI can't find that at all. Do I have to download something or what? ._.
-
OmniOwl about 11 yearsDo I have to get word in order to get these assemblies..? I installed the PIA there, and I still can't see any of the suggested libraries or references in my list in VSE 2012
-
OmniOwl about 11 yearsNo, I don't. Do I have to do that?
-
OmniOwl about 11 yearsWhat a bother. Thanks for the answer though.
-
Bassie over 8 yearsVipar, it should be under the COM tab (on the left) when adding a reference to your project
-
Bron Davies over 7 yearsThis link doesn't work anymore. Use msdn.microsoft.com/en-us/library/15s06t57.aspx
-
OmniOwl almost 7 yearsThis question is like 4 years old. Not only that but a solution was already found because the interops you refer to there didn't work.
-
alphaguy almost 7 years@Vipar i had same problem and none of the above solutions helped me .After a lot of digging this is the way i solved the problem that's why i posted my answer.
-
Cody J. Mathis over 5 yearsThis was exactly what I needed after being unable to locate the items under assembly as others have suggested.