Application_Quit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to run a macro in Outlook when it closes, and I thought I need to
do it under a Private Sub Application_Quit but it won't run. Any ideas? The
macro itself works fine, it's juts getting it to run when Outlook closes. I
thought I would need a Auto_Close like in Excel, but it doesn't recognize
that either.
 
By the time Quit fires almost everything in Outlook has already been
released. There is no BeforeQuit event. The closest you can get to that
would be to handle Explorer.Close on every open Explorer and check to see
that Explorers.Count <= 1 in that event handler. If so then Outlook is about
to close.
 

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

Back
Top