Multiple Para Styles
Hello. I have the following script that verifies and corrects uppercase acronyms on headings—but is limited to a single paragraph style. It would be a significant improvement to make it work on multiple paragraph styles. Also, this function requires the word acronym for every entry; perhaps there is a way to clean up the list. Thank you guys.
app.findChangeTextOptions.caseSensitive = false;
app.findChangeTextOptions.wholeWord = true;
acronym ('ABC');
acronym ('BBC');
acronym ('CBS');
acronym ('FCC');
function acronym (myFind) {
app.findTextPreferences.findWhat = myFind;
app.findTextPreferences.appliedParagraphStyle = "Heading1";
app.changeTextPreferences.capitalization = Capitalization.ALL_CAPS;
app.activeDocument.changeText();
