These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Trapping and handling the document close event.

dotnetwiz
Registered: Jun 8 2010
Posts: 57
Answered

Is there a way to trap the document close event via Javascript so that the script handles the event?

I want to present my own dialog box and options when a user attempts to close the document.

Trapping the Document WillClose event certainly allows me to run a script when the user attempts to close the document, but it does not allow me to cancel the event or prevent the Acrobat's own document save dialog from popping up.

Setting the doc.dirty property to false prevents the save dialog from coming up, but I can still not cancel the event via script.

Any thoughts/suggestions on how I can handle this?

My Product Information:
Acrobat Pro Extended 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Can't be done.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com