Using Script to Apply ParagraphStyle
I'm using a script to apply a style that formats the text in an active document...such as the font style and size and it indents the first line of every paragraph.
When I run this script it only applies the style on the first paragraph and stops.
Here is the script:
var myDocument = app.activeDocument;
var myParagraphStyle = myDocument.paragraphStyles.item("My Paragraph Style");
myDocument.pages.item(0).textFrames.item(0).paragraphs.item(0).appliedParagraphStyle = myParagraphStyle;
Thank you in advance for any help on this.