locked
Outlook 2010 and the 'Ghost Inspector' Issue RRS feed

  • Question

  • Having recently migrated to Outlook 2010, one of our internal departments were keen that sending e-mails as Private was straightforward and intuitive. The out-of-the-box Outlook mail ribbon does not provide shortcut buttons in order to do this; instead, a message options dialog must be opened and sensitivity chosen from a dropdown of several options (the relative meaning of which may be unclear to users - e.g. confidential, personal, private). It was decided to develop a custom Outlook add-in using C#/VSTO to provide a custom private button that would toggle the sensitivity of “private” for that given e-mail.

    An observed problem occurs when a new e-mail is invoked from an external source using simple MAPI (examples of this are the “Save and Send” function in other Office products and/or the “Send to mail recipient” option by right-clicking on a file within Windows Explorer). The problem that occurs is that once that externally invoked e-mail window appears, closing the window, either by clicking Send or just closing the window leaves a secondary window. After some research on the internet it appeared many others were having this issue, referred to as a “ghost inspector”. Out of the resolutions suggested online, only using Win32 API calls to post a WM_CLOSE message to the mail window handle worked.

    We did some testing and we discovered this issue also occurs with a blank Outlook 2010 VSTO add-in with no custom code added, suggesting that there is nothing unique to our code that is causing the problem. This custom add-in is intended for all Outlook users within the company (circa 1000 employees), so we are keen to find a clean, stable resolution to this issue.

    We put a lot of emphasis on well structured, unit tested code, but based on suggestions posted on the Internet, we have needed to include Win32 API calls to try and resolve the problem, which are less than ideal given this brings us into the realms of unmanaged code within our solution.  We are hoping that a different answer is available that does not require us to use unmanaged code, if at all possible.

    Monday, June 9, 2014 1:52 PM

Answers

  • Handling of Simple MAPI Inspectors is not supported by MS or Outlook. There is no simple way of handing those Inspectors, and if ghost Inspectors are observed there is no real simple supported way of handling those windows.

    If you don't handle those Inspectors you shouldn't get the ghosts, but if you do handle them you might. If calling Inspector.Close() doesn't get rid of the ghosts then using a Win32 API call with a WM_CLOSE message is the only way I've found to handle this situation.


    Ken Slovak MVP - Outlook

    Monday, June 9, 2014 3:47 PM