Opening a document while a dialog is open

Add-in Express™ Support Service
That's what is more important than anything else

Opening a document while a dialog is open
David Potashinsky

Posts: 31
Joined: 2010-02-14

I'm using a Backstage view in Office which has a button that when it is clicked it opens a custom dialog.
If I try to open another document while that dialog is already opened I want to display the default Office message that says: "Word can't do this because a dialogue box is open. Please close the dialog box to continue".
However, if our custom dialog is displayed, Word will not show this message and will simply get stuck until I close the dialog.

Is there an event I should listen to? Can I call Office's built-in error message?

Posted 13 Mar, 2017 05:31:30 Top
Andrei Smolin

Add-in Express team

Posts: 15572
Joined: 2006-05-11
Hello David,

A modal dialog opened over some window prevents sending any Windows message to the underlying window. This prevent the underlying window from handling any keyboard and mouse events.

I suppose Word shows this message if you call some function *programmatically* and Word can't perform the action requested because of the dialog window.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Mar, 2017 06:45:51 Top