Can I intercept Outlook closing and cancel it?

Status
Not open for further replies.

EdNerd

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
OL2013 on Win7: From what I've read, the Application_Quit event fires after Outlook has completed any "on Close" actions and just before Outlook completely closes. Is there an event I can use that will capture the Close or Quit command (like if the user clicks the Close X in the top right corner) and give the option to cancel the quit?

Ed
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
There's no such event. You'd need to intercept the button clicks, which isn't possible with VBA since Outlook 2013 since the old commandbars aren't supported anymore. For intercepting the click on the x in the top right you'd need to use the Win32 Api. Afaik there're scripts available that automatically restart Outlook after it has closed.

This Addin can cancel the closing of Outlook: OLKeeper
 

EdNerd

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Thank you for the info. Unfortunately, I'm not allowed to use OL add-ins here at work.
 
Status
Not open for further replies.
Top