L
Lars Roland
Hi I am having problems with my com addin to outlook - it does not use
any Explorer or Inspector, so I think I should be able to do the unloading
inside the onDisconnection.
I have the following four buttons
-------------------------------------------------------
Dim WithEvents previewButton As Office.CommandBarButton
Dim WithEvents reportSpamButton As Office.CommandBarButton
Dim WithEvents reportHamButton As Office.CommandBarButton
Dim WithEvents copyButton As Office.CommandBarButton
-------------------------------------------------------
My onDisconnection sub looks like
-------------------------------------------------------
Dim oOL As Object
Public Sub AddinInstance_OnDisconnection(ByVal RemoveMode As _
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
'resume on error
On Error Resume Next
oOL.CommandBars("Standard").Controls.Item("Copy Message Source to Clipboard").Delete
oOL.CommandBars("Standard").Controls.Item("Preview Message").Delete
oOL.CommandBars("Standard").Controls.Item("Report Spam").Delete
oOL.CommandBars("Standard").Controls.Item("Report Ham").Delete
Set previewButton = Nothing
Set reportSpamButton = Nothing
Set reportHamButton = Nothing
Set copyButton = Nothing
Set oOL = Nothing
End Sub
any Explorer or Inspector, so I think I should be able to do the unloading
inside the onDisconnection.
I have the following four buttons
-------------------------------------------------------
Dim WithEvents previewButton As Office.CommandBarButton
Dim WithEvents reportSpamButton As Office.CommandBarButton
Dim WithEvents reportHamButton As Office.CommandBarButton
Dim WithEvents copyButton As Office.CommandBarButton
-------------------------------------------------------
My onDisconnection sub looks like
-------------------------------------------------------
Dim oOL As Object
Public Sub AddinInstance_OnDisconnection(ByVal RemoveMode As _
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
'resume on error
On Error Resume Next
oOL.CommandBars("Standard").Controls.Item("Copy Message Source to Clipboard").Delete
oOL.CommandBars("Standard").Controls.Item("Preview Message").Delete
oOL.CommandBars("Standard").Controls.Item("Report Spam").Delete
oOL.CommandBars("Standard").Controls.Item("Report Ham").Delete
Set previewButton = Nothing
Set reportSpamButton = Nothing
Set reportHamButton = Nothing
Set copyButton = Nothing
Set oOL = Nothing
End Sub