Preserve Manual Overrides
Hi All,
I have a script which find all the paragraph styles in myFind Array and change all the paragraph styles as per in the name of myChange Array.
Request:
Changing Paragraphs Styles without clear overrides or preserve local overrides like manual bold, italic etc....
script:
var myFind = ["H1", "H2", "H5"]
var myChange = ["a_H1", "a_H2", "a_H5"]
for(var i=0; i<myFind.length; i++){
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.appliedParagraphStyle = myFind;
app.changeGrepPreferences.appliedParagraphStyle =myChange;
app.activeDocument.changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
}
Could anyone give solution for preserve clear overrides.
Thanks in advance
Beginner
