Skip to content

Instantly share code, notes, and snippets.

@caraya
Forked from dvschultz/ReassertParaStyles
Created June 6, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caraya/6bbb09ad669dd43aa70d to your computer and use it in GitHub Desktop.
Save caraya/6bbb09ad669dd43aa70d to your computer and use it in GitHub Desktop.
//originally published here: http://www.pdsassoc.com/downloads/ReassertParaStyles.js.zip
//rewritten to be CC compliant
//DESCRIPTION: Visit all paragraphs in document and reassert paragraph styles
myStyles = app.activeDocument.allParagraphStyles;
app.findTextPreferences = null;
app.changeTextPreferences = null;
for (var n = 1; myStyles.length > n; n++){
app.findTextPreferences.appliedParagraphStyle = myStyles[n];
app.changeTextPreferences.appliedParagraphStyle = myStyles[n];
app.activeDocument.changeText ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment