L
lostwings
I wanted to use com add-in to add one menu for the outlook 2003. The thing is
that it seems that I cannot create the CommandBars Collection object
successfully. Following is the code snippet.
Imports Microsoft.Office
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
oApp = CType(application, Microsoft.Office.Interop.outlook.Application)
Dim myCommandBars As Microsoft.Office.Core.CommandBars
myCommandBars = oApp.ActiveExplorer.CommandBars
end sub
I omit some exception catch statement above. The compiler alwasy report
error as "CommandBars is ambiguous in the namespace 'Microsoft.office.core'
". Why is that, and how can I fix this error?
thanks in advance.
that it seems that I cannot create the CommandBars Collection object
successfully. Following is the code snippet.
Imports Microsoft.Office
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
oApp = CType(application, Microsoft.Office.Interop.outlook.Application)
Dim myCommandBars As Microsoft.Office.Core.CommandBars
myCommandBars = oApp.ActiveExplorer.CommandBars
end sub
I omit some exception catch statement above. The compiler alwasy report
error as "CommandBars is ambiguous in the namespace 'Microsoft.office.core'
". Why is that, and how can I fix this error?
thanks in advance.