我在試圖編譯VB6 Outlook加載項組件後,在同一臺PC上將Office升級到Office 2013 Pro Plus時出現了令人生厭的問題。VB6編譯Outlook加載項 - 編譯錯誤:自動化類型在Visual Basic中不受支持
錯誤
Compile Error: Automation type not supported in 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
道歉 - 在與此糾纏之後,我通過重新閱讀前一篇文章的答案而發現了答案。 – Mayb2Moro 2013-04-26 21:27:52
安裝VB6 service pack 6和最新的更新彙總解決了這個問題 - 正如在這個問題的答案中的鏈接中所建議的:http://stackoverflow.com/questions/15118125/vb6-outlook-add-in-works -in-outlook-2013-but-only-if-full-office-is-installed。 – Mayb2Moro 2013-04-26 21:28:40