-
Notifications
You must be signed in to change notification settings - Fork 465
word run set
zmworm edited this page Apr 30, 2026
·
53 revisions
Modify run character formatting, text content, and inline features.
Path: /body/p[N]/r[M]
| 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 or scheme name | Font color. Accepts hex (FF0000/#FF0000) or scheme color names: accent1–accent6, dark1/dark2, light1/light2, text1/text2, background1/background2, hyperlink, followedHyperlink. |
font.latin |
font name | Latin font slot (rFonts/@ascii + @hAnsi). See i18n for per-script slots. |
font.ea / font.eastasia
|
font name | East-Asian font slot (rFonts/@eastAsia) — Chinese/Japanese/Korean |
font.cs / font.complexscript
|
font name | Complex-script font slot (rFonts/@cs) — Arabic/Hebrew/Thai |
lang.latin |
BCP-47 tag (e.g. en-US) |
Latin language tag (<w:lang w:val>); empty value clears the slot. See i18n. |
lang.ea / lang.eastasia
|
BCP-47 tag | East-Asian language tag (<w:lang w:eastAsia>) |
lang.cs / lang.complexscript
|
BCP-47 tag | Complex-script language tag (<w:lang w:bidi>) |
bold.cs / font.bold.cs
|
bool | Complex-script bold (<w:bCs/>) — required for Arabic/Hebrew bold to render |
italic.cs / font.italic.cs
|
bool | Complex-script italic (<w:iCs/>) |
size.cs / font.size.cs
|
pt | Complex-script size (<w:szCs/>) |
direction / dir / rtl (alias) |
rtl / ltr
|
Run-level reading direction; writes <w:rtl/> on rPr
|
underline |
OOXML underline enum or aliases | Underline. Full enum: none, single, double, thick, dotted, dottedHeavy, dash, dashLong, dashLongHeavy, dashDotHeavy, dashDotDotHeavy, dotDash, dotDotDash, wave (alias wavy), wavyHeavy, wavyDouble, words. Aliases: dashed → dash, dashdot → dotDash. |
strike |
bool | Strikethrough |
highlight |
color name or hex | Highlight |
caps / allCaps
|
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 |
charSpacing/letterSpacing/spacing
|
pt (e.g., 2pt) |
Character spacing |
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) |
path/src
|
file path | Replace image file (for runs containing images) |
textOutline |
"WIDTHpt;COLOR" (e.g. "0.5pt;FF0000"), none
|
Text outline (Word 2010+) |
textFill |
"C1;C2[;ANGLE]" (linear gradient), "radial:C1;C2", or solid COLOR
|
Text fill gradient (Word 2010+) |
w14shadow |
"COLOR[;BLUR[;ANGLE[;DIST[;OPACITY]]]]", none
|
Text shadow (Word 2010+) |
w14glow |
"COLOR[;RADIUS[;OPACITY]]", none
|
Text glow (Word 2010+) |
w14reflection |
tight, half/true, full, none
|
Text reflection (Word 2010+) |
w14 Text Effects: Separator is
;(preferred) or-(legacy fallback). Usenoneorfalseto remove an effect.
# 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
# Replace an embedded image
officecli set report.docx /body/p[3]/r[1] --prop src=new-logo.png
# Add text outline
officecli set report.docx /body/p[1]/r[1] --prop textOutline="0.5pt;FF0000"
# Add text gradient fill
officecli set report.docx /body/p[1]/r[1] --prop textFill="FF0000;0000FF;90"
# Add text glow
officecli set report.docx /body/p[1]/r[1] --prop w14glow="4472C4;6;50"
# Remove text effects
officecli set report.docx /body/p[1]/r[1] --prop textOutline=none --prop w14shadow=noneBased on OfficeCLI v1.0.66