Repository navigation
word style get
goworm edited this page Jun 26, 2026
·
52 revisions
Returned attributes when getting a style definition. Attributes are derived from the underlying XML and vary by style.
Path: /styles/{StyleId}
Style attributes are returned as generic key-value pairs reflecting the XML properties defined for the style. Common keys include:
| Key | Type | Description |
|---|---|---|
type |
string | Style type (paragraph, character, table, numbering) |
name |
string | Display name of the style |
basedOn |
string | Parent style ID this style inherits from |
basedOn.path |
string | Resolved path to the parent style node (/styles/{styleId}) (get-only) |
next |
string | Style ID applied to the next paragraph |
link |
string | Linked style ID (paragraph/character pair) |
uiPriority |
integer | UI sort priority |
qFormat |
boolean | Show in Quick Styles gallery |
semiHidden |
boolean | Hidden from UI |
unhideWhenUsed |
boolean | Unhide when applied |
default |
boolean | Default style for its type |
rsid |
string | Revision save ID |
effective.alignment |
string | Resolved paragraph alignment after walking basedOn → linked → docDefaults (get-only) |
effective.direction |
string | Resolved paragraph reading direction (rtl/ltr) (get-only) |
effective.highlight |
string | Resolved highlight color name inherited from the style chain (get-only) |
effective.lineSpacing |
string | Resolved line spacing (<N>x or <N>pt) (get-only) |
effective.spaceBefore |
string | Resolved space-before, unit-qualified (get-only) |
effective.spaceAfter |
string | Resolved space-after, unit-qualified (get-only) |
effective.strike |
boolean | True when strikethrough is inherited from the style chain (get-only) |
effective.*.src |
string | Source pointer (style id or docDefaults) for each effective.* value — effective.alignment.src, effective.direction.src, effective.lineSpacing.src, effective.spaceBefore.src, effective.spaceAfter.src (get-only) |
Additional run-level and paragraph-level formatting keys (e.g. font, size, bold, alignment, spaceafter) appear when defined by the style. Note: size now returns with a pt suffix (e.g. 12pt).
officecli get report.docx /styles/Heading1/styles/Heading1 (Style)
type: paragraph
name: heading 1
basedOn: Normal
next: Normal
link: Heading1Char
uiPriority: 9
qFormat: true
font: Calibri Light
size: 32pt
bold: true
color: 1F3864
alignment: left
spacebefore: 240
spaceafter: 0
keepnext: true
keeplines: true
Based on OfficeCLI v1.0.64