Skip to main content
Participant
Sep 11, 2020 12:40 PM UTC
Question

InDesign - batch update stylesheets across multiple files?

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

rob day
Community Expert
Community Expert
Sep 11, 2020 3:45 PM UTC

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){}
};   

 

Translate
Jonritter
Participating Frequently
May 17, 2024 1:55 PM UTC

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

Translate
Bill Silbert
Community Expert
Community Expert
Sep 11, 2020 1:09 PM UTC

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.

Translate
Legend
Sep 11, 2020 12:58 PM UTC

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)

Translate