View Single Post
  #1  
Old February 22nd 06, 02:16 AM posted to microsoft.public.outlook
jz
external usenet poster
 
Posts: 2
Default My Com Add-ins cause outlook process blocked

Hi All,

I have developped an outlook Com Add-in and normaly my add in works
fine;
but when I ran it under W2K outlook 2000, I got a problem, the outlook
window is closed
but I can still find outlook.exe process in the task manager, that will
cause my Com Add-in Loading failure.

If I remove my Add In, the outlook is closed properly;
Here is what I am doing in my souce code:


Implements IDTExtensibility2

Dim WithEvents objApp As OUTLOOK.Application
Dim WithEvents objOutlookExp As OUTLOOK.Explorer
Dim WithEvents objActiveInspector As OUTLOOK.inspector
Public WithEvents objItems As OUTLOOK.Items
Dim WithEvents objAppointItem As OUTLOOK.AppointmentItem
Dim objInspector As OUTLOOK.inspector
Dim WithEvents objButtonInstant As Office.CommandBarButton
Dim WithEvents objButtonSchedule As Office.CommandBarButton
Dim objCommandBar As Office.CommandBar
Dim WithEvents Inspectors As OUTLOOK.Inspectors



then in the funciton


Private Sub objOutlookExp_Close()
'Release Explorer Object
'Set objOutlookExp = Nothing
If objApp.Explorers.Count = 1 Then
objCommandBar.Delete
Call Class_Terminate
End If
End Sub


here is the Class_Terminate function



Private Sub Class_Terminate()
MsgBox "Enter the terminate function"

Set objButtonSchedule = Nothing
Set objButtonInstant = Nothing
Set objAppointItem = Nothing
Set objItems = Nothing
Set objActiveInspector = Nothing
Set Inspectors = Nothing
Set objOutlookExp = Nothing
Set objApp = Nothing

End Sub


I add msgbox here to debug. it is called correctly;

I did like what it is said in the book of Ken Slovak;

Can someone point out my problem;

and it there a way to force the process outlook.exe to be terminated?



Thank you very much



jz

Ads