+ Must-Have InDesign Scripts (Free and paid) | Redokun Blog – Automated publishing with XML, IDML, and scripting
The applyparagraphstyle method gives the ability to override existing formatting; setting the property to a style retains local formatting. No swatch is removed, no definitions are modified. But sometimes you need strokes to repeat at certain user-specified locations in a table, or after a table subhead in the middle of a table.
Scripting in InDesign – IDML resources