
Outlook Addin won't allow Outlook to Exit properly
I have a simple addin created with VB6 and the addin.dsr. Module level
variables seem to prevent Outlook from closing (I do not get disconnect or
shutdown events) and Outlook stays resident.
Any pointers would be appreciated...
Private oChangeMonitor As ChangeMonitor '(a class in the current project
that monitors the Explorer)
Private oApp As Outlook.Application
Private Sub AddinInstance_Initialize()
Debug.Print "AddinInstance_Initialize"
End Sub
Private Sub AddinInstance_OnAddInsUpdate(custom() As Variant)
Debug.Print "AddinInstance_OnAddInsUpdate"
End Sub
Private Sub AddinInstance_OnBeginShutdown(custom() As Variant)
Debug.Print "AddinInstance_OnBeginShutdown"
'Won't execute if oChangeMonitor or oApp is not Nothing
End Sub
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
Set oApp = Application
End Sub
Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode As
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
Set oChangeMonitor = Nothing
'Won't execute if oChangeMonitor or oApp is not Nothing
End Sub
Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
Set oChangeMonitor = New ChangeMonitor
Set oChangeMonitor.Explorer = oApp.ActiveExplorer
Set oApp = Nothing
End Sub
Private Sub AddinInstance_Terminate()
Debug.Print "AddinInstance_Terminate"
End Sub