Reply To: Add paragraph style only to a paragraph with 2 lines or more.

#100997

… And as it’s too simple, it will be for free this time! …

var myParas = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements(), P = myParas.length, p;
for ( var p = 0; p < P; p++ ) if ( myParas[p].lines.length > 1 ) myParas[p].appliedParagraphStyle = “Red”;

[… supposing you want to apply a “Red” para style that includes such a grep style: ^\w+ [bold char style]!]

(^/)

This article was last modified on January 16, 2018

Comments (0)

Loading comments...