I have an application that opens new Word documents, lets users update and save, then they can close Word by clicking X in upper right, or they can close word from the application.
Issue comes when user makes edits, clicks X in upper right of Word, Save Dialog displays, user forgets to click save, but then tries to close document from application. Application thinks it successfully closed document using this line of code:
WordApp.Documents[docUri].Close(WdSaveOptions.wdDoNotSaveChanges);
But dialog is still open and doc has not closed. No exceptions or warnings in code.
Is there a way to check for existing open dialog windows and circumvent open dialog boxes with code?