Skip to main content
Participant
February 22, 2017
Answered

how to run a script on document open

  • February 22, 2017
  • 2 replies
  • 4927 views

I would like to run a script on doc/open that will import some data for later use. Under "Javascript/Document Actions" there are listed "Document Will Close" "Document Did Close" and a few others that I might attach a script to, but no "On Document Open".

It must be possible to do this, but I am not able to find it. Any suggestions please?

I am using Acrobat DC Pro

Bill

This topic has been closed for replies.
Correct answer try67

Any code that is placed under Tools - JavaScript - Document JavaScripts will execute when the file is opened.

If you put your code in a function, though, then you have to make sure to also include a call to that function.

2 replies

walshwp2Author
Participant
February 22, 2017

Thanks. I had the functions in the Document Javascripts area but no calls to them ... thanks again BW

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 22, 2017

Any code that is placed under Tools - JavaScript - Document JavaScripts will execute when the file is opened.

If you put your code in a function, though, then you have to make sure to also include a call to that function.