Skip to content

Instantly share code, notes, and snippets.

@dvschultz
Created June 6, 2014 19:49
Show Gist options
  • Save dvschultz/f6b85d286ba1a7e2f9dc to your computer and use it in GitHub Desktop.
Save dvschultz/f6b85d286ba1a7e2f9dc 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