How to install the office 2003 Primary Interop Assemblies?

L

lostwings

I used to install the office 2003 Primary Interop Assemblies correctly.

Now for some weird reasons, I cannot declare variable as
microsoft.office.Core.CommandBars in my COM Add-In program.

The code snippet is as follows:

Imports Microsoft.Office
Imports Extensibility
Imports Microsoft.Office.core
imports System.Runtime.InteropServices

Public Sub OnConnection(ByVal application As Object, ByVal connectMode As
Extensibility.ext_ConnectMode, ByVal addInInst As Object, ByRef custom As
System.Array) Implements Extensibility.IDTExtensibility2.OnConnection

Dim obj As Microsoft.Office.Core.CommandBars

end sub

The compiler gives me error message as "CommandBars is ambiguous in the
namespace Microsoft.office.core".

So I checked all the references' path, and found out that
microsoft.office.interop.visio is still in C:\Windows\assembly\GAC . However,
the C:\Windows\assembly\GAC does not physically exists anymore. So I think
there must be something wrong with the office 2003 PIA. Then I uninstall the
original PIA and reinstall it, hoping that everything can be restored. But
each time after I reinstall the PIA, it still does not create the
C:\Windows\assembly\GAC directory for me, which is not a sign for a
succesful installation. How can I install the PIA correctly?

Appreciate any possible help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top