Reply To: Changing the name of every style in a document

Home Page / Forums / General InDesign Topics (CLOSED) / Changing the name of every style in a document / Reply To: Changing the name of every style in a document

#53047

I think this might be what you are looking for. This script is written in JavaScript so it should work on either platform.

Copy and paste the text below into a blank text file and save it with a *.jsx extension.

You will need to save this file in your Scripts folder (wherever that is located on your hard drive).

I'm assuming that you have used scripts before and are familiar with where they are located and how to run them.

If not, just ask, and I will try to guide you through the process more thoroughly.

RenameStyles();

function RenameStyles() {

myDoc = app.documents[0];

if ( myDoc == null ) { exit }

else if ( myDoc != null || myDoc != 0 ) {

 

myStyle = myDoc.paragraphStyles.item(“INDD_StyleName1”);
if (myStyle != null)  try { { myStyle.name = “Word_StyleName1” } } catch (myError) { exit }


myStyle = myDoc.paragraphStyles.item(“INDD_StyleName2”);
if (myStyle != null)  try { { myStyle.name = “Word_StyleName2” } } catch (myError) { exit }

 

myStyle = myDoc.paragraphStyles.item(“INDD_StyleName3”);
if (myStyle != null)  try { { myStyle.name = “Word_StyleName3” } } catch (myError) { exit }

 

     }

 }

Good luck!

Theresa

This article was last modified on July 22, 2010

Comments (0)

Loading comments...