vsto : application don't quit when i close the document
Hi everybody,
When programmatically i call the close method of Document or Window interface on the latest document, the application (Word) don't quit, which is the "normal" way.
The easier way to reproduce that's :
- to generate an vsto project with Visual studio
- add a button into the CustomTaskPane generated
- add click's event handler for the button and add for example : Application.ActiveWindow.Close(WdSaveOptions.wdDoNotSaveChanges) or Application.ActiveDocument.Close(WdSaveOptions.wdDoNotSaveChanges);
Result :
Without the call to Close(), the application quit on the latest document window open (for me the normal way), otherwise switch the focus to next document window.
With the call to Close(), the application don't quit even on the last document window, otherwise close the actually document window and switch to next document.
How do i follow the normal way without to call Application.Quit which can to disrupt the others vsto addin.
Thank you