Skip to main content
Participant
March 9, 2026
Question

Is it possible to changing dropdown menus in multiple documents at once?

  • March 9, 2026
  • 2 replies
  • 34 views

I have 100 different flyers with a location menu on them and when we get a new location I have to edit all of them separate (Which takes me too long). I have a master now that I just paste into all of the flyers but was wondering if anyone knows of a way to change a files or a JS code that would change all my drop-down at once?

2 replies

Thom Parker
Community Expert
Community Expert
March 9, 2026

Besides the great options provided by Dave, Yes, you can change them all at the same time using a batch script. There are a few different ways to do it. But essentially you’ll need a data source, a csv file, text file, or a master document. The idea is to copy all the data from the source into an array that is defined as a global variable, then use it to set the menu options in all the documents processed in the batch.   It’s the first part of this process that takes a bit of working out. But this script should do the trick. It assumes that the source is a PDF with the same dropdown field name as in all the processed documents. 

 

if(global.sourceDoc && app.activeDocs.every(a=>a.path != global.sourceDoc))
{// if open files do not include the source doc, then get it.
global.sourceDoc = null;
// Select source document
var oSel = app.browseForDoc();
if(oSel)
{
global.sourceDoc = oSel.cPath;
// Open doc and get the source data.
oDoc = app.openDoc({cPath:global.sourceDoc});
var oMenuFld = oDoc.getField("MenuField");
global.menuData = [];
for(var i=0;i<oMenuFld.numItems;i++)
global.menuData.push(oMenuFld.getItemAt(i));
}
else{
global.menuData = null;
event.rc = false;
}
}

if(global.sourceDoc && global.menuData){
// SetData
event.target.getField("MenuField").setItems(global.menuData);
}

Note that this script has a number of issues. For example it doesn’t do any testing to ensure the source and target documents contain the correct field name. 

It also hasn’t been tested in any way. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Dave Creamer of IDEAS
Community Expert
Community Expert
March 9, 2026

Barring a JavaScript option, which is beyond my capabilities, I can think of two options:

  1. You can copy and paste the field from one document to the other. 
  2. You can combine the flyers together (or output as a single, multi-page PDF from InDesign); use the Distribute Across Pages option to place the field on all pages; use the Split command to save the pages out as separate flyers/forms. 
David Creamer: Community Expert (ACI and ACE 1995-2023)