Search code examples
c#.netvisual-studio-2013ms-wordoffice-interop

Using winword or excel library in Visual studio 2013


I need to programmatically access word and excel files in my dotNet 4.5 Code. I am using Visual Studio 2013. I have added a reference to the DLL Microsoft Office 14.0 DLL and used following line of code:

using Word = Microsoft.Office.Interop.Word;

However I get following error when trying to run the application:

The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office'


Solution

  • You need to add Interop of MSword into your project. Add reference->assemblies->Extensions find for the interop you want to add and add it.

    Here is a little explanation about interop dll.