Skip to content

word style get

zmworm edited this page Apr 29, 2026 · 51 revisions

Word: Style - get

Returned attributes when getting a style definition. Attributes are derived from the underlying XML and vary by style.

Path: /styles/{StyleId}

Returned Attributes

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
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

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).

Example

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

Clone this wiki locally