Skip to main content
Participant
June 6, 2018
Question

Adding a script to the Doc/WillClose only works once

  • June 6, 2018
  • 2 replies
  • 650 views

I have some code in my document action "WillClose", but my script is called only once. Why this is happening?

I have Acrobat DC.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
June 7, 2018

I've seen this issue reported before. It seems to be a bug in Acrobat.

Karl Heinz  Kremer
Community Expert
Community Expert
June 6, 2018

The script will only run once when the document is about to close. When would you expect the script to run? You will have to open the document again, and then try to close to have the script triggered again.

Arianne69Author
Participant
June 6, 2018

Thanks, even though I have some changes and when Adobe ask me if I want to save my changes I answer "Cancel"

Legend
June 7, 2018

Ah you mean WillClose is not called again if you cancel closing, then close again? Odd, I‘d expect WillClose to be called only after an affirmative prompt, hence still only once but when it really closes.