I have a small problem. How to apply existing styles. Different style to the first, second and third paragraph of the story/selection. I think it's simple, But I can not solve the problem. Thank you.
In simple words I want to apply automatically, superscript headline, main headline, text drop caps.... thanks
That's easy enough:
var mySelection = app.selection;
var paraStyle1 = app.activeDocument.paragraphStyles.itemByName("style1");
var paraStyle2 = app.activeDocument.paragraphStyles.itemByName("style2");
mySelection.paragraphs.appliedParagraphStyle = paraStyle1;
mySelection.paragraphs.appliedParagraphStyle = paraStyle2;
This is perfect thanks.