Skip to content

word style add

zmworm edited this page May 5, 2026 · 52 revisions

Word: Style - add

Add a named style definition for paragraphs, characters, tables, or numbering.

Parent: /styles

Properties

Property Default Description
id CustomStyle Style ID
name CustomStyle Display name
type paragraph paragraph, character/char, table, numbering
basedOn - Base style ID
next - Next style ID
font, size, bold, italic, color - Formatting
align / alignment, spaceBefore, spaceAfter, lineSpacing - Paragraph settings
leftIndent / indentLeft / indent, rightIndent, firstLineIndent, hangingIndent - Indents (twips or unit-qualified) — mirrors Set
pbdr.* - Paragraph borders (style;size;color;space); supports .top, .bottom, .left, .right, .between, .bar, .all

Examples

officecli add report.docx /styles --type style --prop name="Custom Heading" --prop id=CustomHeading --prop basedOn=Heading1 --prop font=Georgia --prop size=18 --prop color=2E4057

Based on OfficeCLI v1.0.73

Clone this wiki locally