Skip to content

word style add

goworm edited this page Jun 26, 2026 · 53 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
spaceBeforeAuto, spaceAfterAuto - Word's automatic same-style spacing toggles before/after paragraphs (bool)
font.asciiTheme - Theme font binding for the ascii slot (minorHAnsi, majorHAnsi, …). Family: font.hAnsiTheme, font.eaTheme, font.csTheme
snapToGrid, topLinePunct, suppressAutoHyphens, suppressLineNumbers - CJK grid snap, leading-punct compression, disable auto-hyphenation, exclude from line numbering (bool; Add/Set only, not surfaced on Get)
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