2

I marked this question as 'not a duplicate' because the answer to the other question did not solve my problem. this question does contain an answer which helped me (second answer down, about the object library), however I was still unable to add the required reference after this.

As the below answer suggested, I checked in C:/Windows/Assembly and found a load of MSIL files. When checking these in Visual Studio (under Project - Add Reference) I couldn't find them as they are not DLLs and the folder structure had completely changed.

However, running a search here for Microsoft.office.interop.word allowed me to find the DLL and add it to the project.

Hooray!


I need to add the following using directive to my project in order to programmatically convert word documents to pdf:

using Microsoft.Office.Interop.Word;

However, no matter what I do I can't seem to find the dll or reference assembly:

enter image description here

As you can see, I do have office installed on my machine as well:

enter image description here

No matter where I look online, the only answer seems to be "make sure you have word installed", which is not helpful as I clearly do!

Community
  • 1
  • 1
Bassie
  • 9,529
  • 8
  • 68
  • 159
  • Possible duplicate of [Can't locate Microsoft.Office.Interop.Word in Reference List](http://stackoverflow.com/questions/16054184/cant-locate-microsoft-office-interop-word-in-reference-list) – randrade86 Jan 07 '16 at 15:13
  • Hi Rodolfo, I updated my question with a solution and more details hope that is okay – Bassie Jan 07 '16 at 15:22

1 Answers1

3

It should be somewhere in C:\Windows\assembly\

Edited my answer due to below question should people have the same issue in future.

Browse (when adding a new Reference) > go to C:\Windows\assembly\ > GAC_MSIL > Microsoft.Office.Interop. > Office version > Dll should be there

haddow64
  • 676
  • 1
  • 7
  • 24
  • I haddow64, THANK YOU I can't believe I couldn't find this information anywhere else. I am still having an issue though - I can see the file in Explorer, but not when I try to add a reference throught Visual Studio (as the file is not a dll) - do you happen to know how I can overcome this? – Bassie Jan 07 '16 at 15:15