Question
Javascript find/change fails
Hi all
I've written a small javascript to replace tags in a document with formatting, but it's not working, and I have no idea why. I know that the code below is correctly populating the find and change fields in the dialog, and I know that if I open the find/change dialog and click "Find Next," this works. Run from the Javascript, however, the actual find/change is not effected. Can anyone see a problem here that I'm missing? (This is the complete code other than a couple comments.)
Thanks!
m.
-----
app.findChangeGrepOptions.includeFootnotes = true;
app.findGrepPreferences.findWhat = "¦case:all_caps¦(.+)¦/case¦";
app.changeGrepPreferences.changeTo="$1";
app.changeGrepPreferences.capitalization=Capitalization.ALL_CAPS;
app.activeDocument.changeGrep(); //This line seems not to work