views:

315

answers:

2

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.

A: 

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

Joshua
+2  A: 

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.

Rowland Shaw
-1, wrong. Add the reference to the PIA. It will suffice to compile even if the COM component is not present on the compiling machine. I should know -- we did it that way at Cedaron.
Joshua
You might need to tell Microsoft that then...http://msdn.microsoft.com/en-us/library/aa195478(office.11).aspx
Rowland Shaw