Question Microsoft Word Event Handling - DocumentBeforeClose

GaryG

New member
Joined
Jul 7, 2011
Messages
1
Programming Experience
10+
Hi

I have an app, that generates a word 2007document via the PIA's and then displays the document (in Word) to the user, so they can edit it.

I capture the Word_DocumentBeforeClose event, as I am implementing my own save functionality where the documents gets converted to a PDF and stored in a central repository.

However, before it get's this far, I display a messagebox (infragistics messagebox) to the user, stating the fact that closing the document will save it in a read-only fashion and do they want to continue, giving them the buttons of Yes and No to click on.

Using the different ways you can close word:
  • the X in the top right, displays my message box and allows me to click on a Yes or No button and the default Arrow cursor is displayed.
  • Single-clicking on the Office Button in the top left, then selecting Exit Word from the menu, results in the same as above.
However:
  • Double-clicking on the Office Button in the top left, displays my messagebox, but an Hourglass cursor is displayed and I cannot use the mouse to click on Yes and No, but instead have to resort to using the arrow keys and space bar.
Changing to a standard messagebox alleviates the issues, but as the rest of the app is using the infragistics messagebox, it would be good to keep it consistent.

If anybody has any ideas, they would be so very much appreciated, as this is becoming quite frustrating, as I can't see that the different methods of closing are performing anything differently.
 
Last edited:
Back
Top