I am importing styles from a separate .indd and applying them with the function newTextFrame.appliedObjectStyle
The Object Style has the “Apply next Paragraph Style” Option enabled, but when i execute my script, only the first paragraph style is applied. When i reapply the object style after my script has finished, it is working.
I tried adding .applyNextParagraphStyle
or .enableParagraphStyle
but it didn’t work ( I know these are ususally used for creating object styles)
Advertisement
Answer
Okay, I found the solution.
It had something to do with the order of my code. Basically i was applying the object style before loading the content. Now, that the content is already placed in the text frame and THEN applied with the object style, it works fine!