Skip to content

word run get

goworm edited this page Jun 26, 2026 · 52 revisions

Word: Run - get

Returned attributes when getting a run element within a paragraph.

Path: /body/p[N]/r[M]

Returned Attributes

Key Type Description
font string Font family name
size integer Font size (half-points)
bold boolean Bold formatting
italic boolean Italic formatting
color string Font color (hex, e.g. FF0000)
underline string Underline style (single, double, wave, etc.)
strike boolean Strikethrough
highlight string Highlight color name (yellow, green, etc.)
caps boolean All caps
smallcaps boolean Small caps
dstrike boolean Double strikethrough
vanish boolean Hidden text
outline boolean Outline effect
shadow boolean Shadow effect
emboss boolean Emboss effect
imprint boolean Imprint effect
noproof boolean No proofing flag
rtl boolean Right-to-left text
superscript boolean Superscript vertical alignment
subscript boolean Subscript vertical alignment
shading string Shading fill color. Alias: shd
shading.val string Shading pattern token. Emitted only for a true pattern shading (pct*/stripe/cross); a solid background reads back as the canonical fill key.
shading.fill string Shading fill color hex (#RRGGBB). Pattern shading only.
shading.color string Shading foreground (pattern) color hex (#RRGGBB). Pattern shading only.
kern integer Kerning activation threshold in half-points (e.g. 28 = 14pt)
font.hint string Font slot hint (rFonts/@hint): eastAsia, cs, default
font.asciiTheme string Theme font binding for the ascii slot
font.hAnsiTheme string Theme font binding for the hAnsi slot
font.eaTheme string Theme font binding for the East-Asia slot
font.csTheme string Theme font binding for the complex-script slot
font.ascii string Individual rFonts/@ascii slot readback (on Add/Set use font.latin)
font.hAnsi string Individual rFonts/@hAnsi slot readback (on Add/Set use font.latin)
dirty boolean Run flagged dirty (rPr/@dirty=1) — Word needs reflow on next open
link string Hyperlink URL
textOutline string Text outline (e.g. "0.5pt;#FF0000")
textFill string Text fill: "#C1;#C2;ANGLE", "radial:#C1;#C2", or "#COLOR"
w14shadow string Text shadow color (e.g. "#000000")
w14glow string Text glow (e.g. "#4472C4;6")
w14reflection string Text reflection style: tight, half, full
effective.size string Inheritance-resolved font size (read-only). Surfaced only when the run does not set size directly.
effective.bold boolean Inheritance-resolved bold (read-only). Suppressed when bold is set directly.
effective.italic boolean Inheritance-resolved italic (read-only). Suppressed when italic is set directly.
effective.color string Inheritance-resolved text color (read-only, #-hex). Suppressed when color is set directly.
effective.underline string Inheritance-resolved underline style (read-only).
effective.font.ascii string Inheritance-resolved Latin/ASCII font slot (read-only).
effective.font.hAnsi string Inheritance-resolved High-ANSI font slot (read-only).
effective.font.eastAsia string Inheritance-resolved East-Asian font slot (read-only).
effective.font.cs string Inheritance-resolved complex-script font slot (read-only).
effective.rtl boolean Inheritance-resolved right-to-left flag (read-only). Emitted even when rtl is set directly so callers can compare direct vs cascade-resolved state.
effective.rtl.src string Source pointer (style/docDefaults path) for effective.rtl.

effective.* keys are read-only inheritance-resolved values: the run does not set the property directly but resolves it by walking the run/paragraph style chain up to docDefaults. A direct value always wins — effective.X is suppressed when the run sets X itself (except effective.rtl, which is always emitted).

Example

officecli get report.docx /body/p[1]/r[1]
/body/p[1]/r[1] (Run) "Annual Report 2025"
  font: Calibri
  size: 56
  bold: true
  color: #1F3864
  underline: single

Based on OfficeCLI v1.0.64

Clone this wiki locally