Trapping Outlook Close Event

A

Amol Kulkarni

Hi,
I am developing COM Add-in for MS Outlook 2003. I need to trap close
event of Outlook so that I can process the Sent items in Sent Item folder.
Just similar as Outlook manages the close event by asking for confirmation
when there are some mails pending to be sent in Outbox folder. When user
clicks Cancel Outlook remains open else shut down. How to trap this close
event. I found Explorer.close and also Application.Quit events, but it gets
fired after Outlook closes. Anybody knows how to trap this event? Any code
sample would be a great help

Thanks

Amol Kulkarni
 
K

Ken Slovak - [MVP - Outlook]

Unfortunately Explorer.Close is about all you can use. By the time
On_Disconnection fires all your Outlook objects have been released (that
event wouldn't fire otherwise). Application_Quit is also too late.
OnBeginShutdown can be used for some things but Explorer.Close is your best
option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top