Ryan Gregg, a Program Manager on the dev team with Outlook, has released details on some important changes to Outlook that will be in effect when Office 2007 SP2 (currently in Beta) is released Out-of-process applications are now subject to crashes if proper error handling is not implemented. Basically, if you have written a COM Add-In, you’re safe. But if you have created an .exe that has hooks into the Outlook Object Model, any of your variables that rely on Outlook objects will be automatically dereferenced when Outlook closes. The suggested method to accommodate the change is to trap the Application_Quit event and gracefully – and quickly – dispose of your objects and abort relevant processes in your application.
In the past, Outlook would wait for any external references to disconnect before closing. Badly written applications could effectively keep Outlook loaded, but without a visible interface. This has frustrated users for years (and is responsible for many installations of KnockOut) and Microsoft has finally responded in kind.
Ryan’s Look at Outlook Programmability : Application Shutdown Changes in Outlook 2007 Service Pack 2 Beta: