Whilst writing an add-in for office, I've had to define an eventhandler for the DocumentBeforeSave
event.
This handler works fine except for one exception. This exception comes from the following:
- I open a word document and edit some text.
- I click on the close button.
- Word asks me if i want to
save
,don't save
orcancel
. - I choose
don't save
.
Following these steps, office still forces me in the DocumentBeforeSave event. Without a way to determine if the user intended to cancel his save or not.
Is there a way to check if the user chose to save or not, and if so how? So far MSDN and other sources came up empty.
Note: In office 2013 and up, this should be checked by Doc.IsInAutosave
, sadly this function doesn't exist in office 2007 and office 2010.