Skip to main content
Participant
Feb 22, 2017 11:21 AM UTC
Answered

how to run a script on document open

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Feb 22, 2017 11:42 AM UTC

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
Feb 22, 2017 11:55 AM UTC

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

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Feb 22, 2017 11:42 AM UTC

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.

Translate