Skip to main content
Participant
September 11, 2020
Question

InDesign - batch update stylesheets across multiple files?

  • September 11, 2020
  • 3 replies
  • 1446 views

I have a folder containing 30 separate files that all have a paragraph style that I created, "Foo style", that is set in Times New Roman.

I'd like all of these to have the Foo style set in Arial.

Is there a way to batch edit the files to say that Foo should be Arial across all files?

This topic has been closed for replies.

3 replies

rob day
Community Expert
Community Expert
September 11, 2020

Make a copy of the folder with the files and try this JS:

 

 

var myFolder = Folder.selectDialog("Select the folder containing InDesign Files", "");
var f = myFolder.getFiles("*"+ ".indd");
var ps;
// note that appliedFont is the font and style separated by a tab
var nf = "Arial\tBook";

for (var i = 0; i < f.length; i++){
    //set the 2nd parameter set to false hides the files when they are opened
    var doc = app.open(File(f[i]), true);
    
    try{
		ps = doc.paragraphStyles.item("Foo Style");
        ps.appliedFont = nf;
        doc.close(SaveOptions.YES)
	} catch (e){}
};   

 

HanHuman
Participating Frequently
May 17, 2024

Hi, old thread but do you care to explain a bit more about how to setup parametters?
Is it only 1 style at a time?
Thx

Bill Silbert
Community Expert
Community Expert
September 11, 2020

You might want to check out this link https://redokun.com/blog/indesign-scripts that contains a long list of both free and paid InDesign scripts to see if a script exists to do what you're looking for.

Legend
September 11, 2020

You could all all of the files to an InDesign Book file, then use Syncronize to push the changes across all book documents. 

If you do this, be sure to first uncheck all options except for Paragraph Styles (and Character Styles, if applicable)

This will only work if there are not other same-name styles with differnet definitions.  

The other way would be to import only the Foo style into each document, but I don't think you can batch that. (unless it would be possilbe with a script, but that is outside of my expertise)