Copy link to clipboard
Copied
Using Acrobat XI Pro, I can't figure out how to open the window that contains ALL the Javascripts in the document. I need to add a single line of code to all required fields, and it would be 10x easier if I could go through all the scripts in the document at once, instead of clicking Properties > Actions > Edit for each field. In Acrobat X Pro, in EDIT mode, I would click Other Tasks > Javascripts > Edit all Javascripts to accomplish the same task, but I'm using Acrobat XI Pro at work, and the menus are very different.
Select "Edit all JavaScripts" on the JavaScript pane on the right side "Tools" panel. If the JavaScript Pane is not visible, then select it from the dropdown menu on the top right of the Tools panel.
Copy link to clipboard
Copied
Select "Edit all JavaScripts" on the JavaScript pane on the right side "Tools" panel. If the JavaScript Pane is not visible, then select it from the dropdown menu on the top right of the Tools panel.
Copy link to clipboard
Copied
Thank you, Thom. That's been bugging the crap out of me.
Copy link to clipboard
Copied
You should not edit the code through that window! It can cause serious damage to your file.
I recommend you only use it to locate the code you want to edit and then go to the actual location of that code and edit it there.
Copy link to clipboard
Copied
Or, here a couple strategies for handling multiple code changes that reduce both time/effort to maintain code and the human error associated with making the same change over and over again.
1. If the code is short segments used in a field script, then use "field.setAction" the Console to set the script everywhere it is needed. You aught to be able to do this in a single loop, cause in such cases(where the same script is needed in many fields) your field names should follow a regular pattern.
2. If the code is long, but only slightly different in every place it is used, then create a document level function to encapsulate the code, replacing the differences with variables. Then call this function from all the places where it is needed using strategy #1.