[Jsx] Apply Paragraph Style, then next style via scripting?
Is it possible via scripting to apply a Paragraph Style and next style?
Basically right now manually I select a text frame and then select all text. The text frame is linked to other text frames which the text flows to. I then right click on the paragraph style and select "Apply [Paragraph Style Name] and then Next Style" where [Paragraph Style Name] is the name of the paragraph style.
I would like to automate this process.
- I should be able to identify the first text frame via the text frames name (this should not be hard).
- Once the text frame is selected I need to select all of its text. Not exactly sure how to do this and insure it selects all the text included linked text frames.
- Once the text is selected I then apply the paragraph style. I assume something like app.selection.texts[0].appliedParagraphStyle =
app.activeDocument.paragraphStyles.item("[Insert Paragraph Style Name]");
The part I am unsure about is will that apply the next style or is there a certain way I need to call it to apply the next style.
Thanks in advance to anyone that helps out!


