I want to write a macro for Outlook that is called when I click the X. I want the Application_Quit() subroutine to stop the program from quitting, then minimize it instead. I can figure out the minimization, but how to I prevent it from quitting?
Share
Not truly possible to prevent the close. You can tell based on the method signature of the Application_Quit() event:
A cancellable event will look like this:
I searched around, and found a kind of cool hacky trick, though, if you don’t mind the side-effect that Outlook automatically minimizes when it launches (found on this forum, copied and reformatted):
Trick is to add a macro that auto-minimizes Outlook when it starts: