Wednesday, May 16, 2012

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

 

I encountered the following error "The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' "

Found a working solution in one of the posts in this thread.

Here’s what I did:

  1. Download the Microsoft Office 2010: Primary Interop Assemblies Redistributable at this link.
  2. Installed the software; it would extract as a setup file named “o2010pia.msi”
  3. Navigated to the “.NET” tab and added the reference “Microsoft.Office.Interop.Word”.  You can also manually add the reference under the
    <assemblies>
    tag
    <add assembly="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

2012-05-16_163730


If all goes well, it should get rid of the error message just as it did for me :)

No comments: