1

I have installed the 2007 PIA and repaired my Office 2007 installation.

Still, when I add a reference to the Office 12 Object Library in VS2005, I only see Office.Core and cannot add an 'imports' statement for Office.Interop

I have checked that Windows\assembly\gac\ has got the interop dlls.

2 Answers 2

2

With the PIAs installed, you have to add a reference to the corresponding COM library - instead of generating an automatic interop, the PIA will be used instead.

To quote Microsoft's documentation

For Microsoft Office applications that do not have projects in Visual Studio Tools for Office, you must add a reference to the appropriate application or component to your project manually. Adding a reference to the component references the primary interop assembly, if the assembly is installed in the global assembly cache. Office applications and components are accessible from the COM tab of the Add Reference dialog box.

2
-1

Add a browse reference. You have to ship the PIA dll to get any benefit out of it anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.