I have a weekly publication that I set up. The design is always exactly the same, and the original MS Word file is set up with the exact same formatting to ease the process. To speed it up I have a ready defined FindChangeByList text file to apply the formatting.
I set it up to automatically find certain formats and apply the appropriate paragraph and character styles. Everything works and applies fine except the last step.
I have a ready text box with an object style applied that I copy to the clipboard before running the script, which then should find every beginning of a paragraph with the “BODY TEXT” paragraph style applied to it and anchor the clipboard contents there. In the GREP Find/Change dialog box it works perfectly, but in the script it doesn’t, and an error pops up.
So my question is: is something wrong with the way I defined it, or can the script not handle clipboard contents?
Following is the line of the script that I use:
grep {findWhat:"^(.)", appliedParagraphStyle:"BODY TEXT"} {changeTo:"~C$1"} {searchBackwards:false, includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, kanaSensitive:true, widthSensitive:true} Anchor Header Boxes