Skip to content

word run set

zmworm edited this page Mar 18, 2026 · 55 revisions

Word: Run - set

Modify run character formatting, text content, and inline features.

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

Properties

Property Accepted Values Description
text text Run text content
font font name Font family
size number (pt) Font size
bold bool Bold
italic bool Italic
color hex color Font color
underline single, double, thick, dotted, dashed, none Underline
strike bool Strikethrough
highlight color name or hex Highlight
caps bool All caps
smallCaps bool Small caps
dstrike bool Double strikethrough
superscript bool Superscript
subscript bool Subscript
vanish bool Hidden text
outline, shadow, emboss, imprint bool Text effects
noProof bool No spell check
rtl bool Right-to-left
shading/shd shading format Background
link URL or none Hyperlink
formula LaTeX string Replace with inline math
alt text Alt text (for embedded images)
width, height EMU Image size (embedded images)

Examples

# Change run formatting
officecli set report.docx /body/p[1]/r[1] --prop font=Arial --prop size=14 --prop bold=true --prop color=FF0000

# Add hyperlink to a run
officecli set report.docx /body/p[1]/r[1] --prop link=https://example.com

Based on OfficeCli v1.0.6

Clone this wiki locally