View Single Post
  #2  
Old February 14th 06, 08:24 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,772
Default Outlook.Application handles Quit

By the time Quit fires all of you Outlook objects are out of scope so the
event won't fire correctly. It will fire in the Outlook VBA, but again all
objects are out of scope so it's a pretty useless procedure for that.

Use Explorer.Close and Inspector.Close to check the counts of both
collections.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"donald" wrote in message
oups.com...
Hi there,

I got this code below from my COM add-in which handles the Quit on my
outlook Application but it never get fired why is this? and how can i
fix this?

Thankls

Donald

Public WithEvents _Application As Outlook.Application

Private Sub app_quit() Handles _Application.Quit
MsgBox(_Application.Inspectors.Count)
MsgBox(_Application.Explorers.Count)
End Sub


Ads
 

Web Advertising - Homes for Sale - Property for sale in Spain - Credit Cards - Credit Cards