none
How exactly do you override the InspectorEvents_CloseEventHandler to discard save? RRS feed

  • Question

  • I'm trying to programmatically display an Outlook MailItem as Read Only.

    So far I've able to intercept the inspector window via NewInspector event and made my modification to display the modified content of the MailItem, when it comes to closing the MailItem/Inspector window, due to the modification I did, it always prompt for Save...

    I've tried using all the ways I've read and think of, and still couldn't either override the Close/Write event to discard the changes.


    ((InspectorEvents_Event) inspector).Close event only happens AFTER the inspector window is closed
    ((ItemEvents_Event)item).Close also only happens AFTER the inspector close event
    ((ItemEvents_Event)item).Write only happens if you hit SAVE at the prompt

    I've also tried to item.Close(OlInspectorClose.olDiscard) inside those events but it doesn't really happen because they all happens AFTER the prompt...

    How the heck do can you intercept the close event in order to discard the changes????

    I've read 2 dozen threads everywhere on the web!



    • Edited by totszwai Tuesday, November 22, 2016 9:30 PM Updated wording
    Tuesday, November 22, 2016 9:29 PM

All replies