Using find/change to remove text sometimes affects paragraph styles
I'm using find/change methods in CS6 to remove large swaths of unwanted content in documents and it works well and fast. Only one problem: The applied paragraph style of some the remaining content changes to another paragraph style, which is undesired. I want to maintain the existing paragraph styles of the remaining content, even as other content is deleted around it.
In my case, I'm removing content matching a given condition.
var myDoc = app.activeDocument;
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.appliedConditions = ['Content with this condition is removed'];
myDoc.changeGrep();
I would greatly appreciate your suggestions for removing the content without affecting the applied paragraph styles of what remains.
Thanks,
Jon