Skip to main content

Style

Import from @reductoai/docx/node, @reductoai/docx/officejs.

Style properties

delete()

Remove the style and every reference to it, so nothing dangles: pStyle, rStyle and tblStyle references in the main story, headers, footers, notes and numbering levels are dropped (the content falls back to defaults), other styles’ w:basedOn inherits this style’s own base, their w:next and w:link are dropped, and a settings w:defaultTableStyle naming it goes too. Style.inUse stays the pre-delete safety read.

getOoxml()

Extension: the style’s own w:style element, the provenance escape hatch.

getRanges()

Extension: live ranges over the MAIN story where this style is used — whole paragraphs for a paragraph style, run spans for a character style. Direct references only; table and list styles refuse.

linkToListTemplate()

office.js Style.linkToListTemplate; listLevelNumber (1 through 9, default 1) is VBA’s second argument. Paragraphs in the style number at that level, as a heading style in a multilevel list.

set()