niklasberlec
niklasberlec

Reputation: 45

Import Object Format with applied Paragraph Styles

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.

Object Style Preferences

enter image description here

I tried adding .applyNextParagraphStyleor .enableParagraphStyle but it didn't work ( I know these are ususally used for creating object styles)

Upvotes: 0

Views: 222

Answers (1)

niklasberlec
niklasberlec

Reputation: 45

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!

Upvotes: 1

Related Questions