Reply To: Find, copy, and paste all text styled with a character style?

Home Page / Forums / General InDesign Topics (CLOSED) / Find, copy, and paste all text styled with a character style? / Reply To: Find, copy, and paste all text styled with a character style?

#61091

That was a fun 5-minute exercise!

I did take a shortcut, though — copying the text immediately into a new document is sort of a bother. You have to draw an empty text frame in your source document first and put the text cursor into it. Then run this script (make sure to fill in the correct character style first).

app.findTextPreferences = null;
app.findTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item(“phonenumber”);
sourcelist = app.activeDocument.findText().reverse();
while (sourcelist.length > 0)
app.selection[0].parentStory.insertionPoints[-1].contents = sourcelist.pop().contents+”r”;

This article was last modified on November 18, 2011

Comments (0)

Loading comments...