在将同一台 PC 上的 Office 升级到 Office 2013 Pro Plus 之后,我在尝试编译 VB6 Outlook 插件组件时遇到了一个令人恼火的问题。
错误
编译错误:Visual Basic 中不支持自动化类型
正在上线:
Implements IDExtensibility2
我将在下面粘贴该文件中的完整代码。
在另一台 PC 上,我设法完成所有设置,并将 Office 升级到 2012,它编译没有问题,但现在在同一台 PC 上 - 我得到了同样的错误。在此期间,我在 Office 安装方面搞砸了很多,所以我无法准确地告诉你我在它工作和不工作之间做了什么,但最重要的是,它似乎不应该做我所做的事情我正在尝试做(正如我所做的那样!),我只需要一些关于我可能需要做什么才能恢复工作设置的指导。有任何想法吗??
Implements IDTExtensibility2
Private gBaseClass As New clsOlkAddIn
Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
'To Be Declared for IDTExtensibility2
End Sub
Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
'To Be Declared for IDTExtensibility2
End Sub
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
gBaseClass.InitHandler Application, AddInInst.ProgId
End Sub
Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode _
As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
Dim objCB As Office.CommandBar
On Error Resume Next
'If RemoveMode = ext_dm_UserClosed Then
Set objCB = golApp.ActiveExplorer.CommandBars("Addin")
objCB.FindControl(Type:=msoControlPopup, Tag:="Menu").Delete
objCB.FindControl(Type:=msoControlButton, Tag:="AddEmailsButton").Delete
objCB.FindControl(Type:=msoControlButton, Tag:="SyncContactsButton").Delete
objCB.FindControl(Type:=msoControlButton, Tag:="SyncTasksButton").Delete
objCB.FindControl(Type:=msoControlButton, Tag:="SyncCalendarButton").Delete
objCB.Delete
'End If
gBaseClass.UnInitHandler
Set gBaseClass = Nothing
End Sub
Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
'To Be Declared for IDTExtensibility2
End Sub