-
Notifications
You must be signed in to change notification settings - Fork 934
word paragraph get
goworm edited this page Jun 26, 2026
·
52 revisions
Returned attributes when getting a paragraph element.
Path: /body/p[N]
| Key | Type | Description |
|---|---|---|
style |
string | Paragraph style name |
alignment |
string | Alignment (left, center, right, both). Alias: align
|
spaceBefore |
string | Space before paragraph (e.g. "12pt") |
spaceAfter |
string | Space after paragraph (e.g. "12pt") |
lineSpacing |
string | Line spacing: "1.5x" (auto/multiplier) or "18pt" (exact/atLeast) |
firstlineindent |
integer | First line indent (twips) |
leftindent |
integer | Left indent (twips) |
rightindent |
integer | Right indent (twips) |
hangingindent |
integer | Hanging indent (twips) |
keepNext |
boolean | Keep with next paragraph. Alias: keepnext
|
keepLines |
boolean | Keep lines together. Alias: keeplines
|
pagebreakbefore |
boolean | Page break before paragraph |
widowcontrol |
boolean | Widow/orphan control |
shading |
string | Shading fill color. Returns pattern;fill;color for non-clear patterns |
shading.val |
string | Shading pattern token (pct*/stripe/cross), emitted only for a true pattern shading; solid backgrounds read back as the canonical fill key |
shading.fill |
string | Shading fill color hex, pattern shading only |
shading.color |
string | Shading foreground (pattern) color hex, pattern shading only |
pBdr.top |
string | Top border definition |
pBdr.bottom |
string | Bottom border definition |
pBdr.left |
string | Left border definition |
pBdr.right |
string | Right border definition |
pBdr.between |
string | Between border definition |
pBdr.bar |
string | Bar border definition |
numid |
integer | Numbering definition ID |
numlevel |
integer | Numbering level |
numFmt |
string | Number format (decimal, bullet, lowerLetter, etc.) |
listStyle |
string | Associated list style name |
start |
integer | List start number |
font |
string | First-run font family name |
size |
string | First-run font size (with pt suffix, e.g. 12pt) |
bold |
boolean | First-run bold formatting |
italic |
boolean | First-run italic formatting |
color |
string | First-run font color (hex, e.g. #FF0000) |
underline |
string | First-run underline style |
strike |
boolean | First-run strikethrough |
kern |
integer | Kerning threshold (half-points) on an empty paragraph's ¶-mark run. Text-bearing paragraphs surface this under markRPr.kern
|
effective.size |
string | Inheritance-resolved font size (read-only), from first run's style chain → paragraph style → docDefaults |
effective.font.ascii / effective.font.hAnsi / effective.font.eastAsia / effective.font.cs
|
string | Inheritance-resolved Latin / High-ANSI / East-Asian / complex-script font slot (read-only) |
effective.bold / effective.italic
|
boolean | Inheritance-resolved bold / italic (read-only) |
effective.color |
string | Inheritance-resolved font color (read-only); #RRGGBB or scheme color name |
effective.underline |
string | Inheritance-resolved underline style (read-only) |
effective.rtl |
boolean | Inheritance-resolved right-to-left flag (read-only) |
effective.<prop>.src |
string | Source pointer for the matching effective.<prop> key (e.g. /styles/Heading1, docDefaults). One emitted per effective value above |
markRPr.bold / markRPr.italic / markRPr.strike / markRPr.rtl
|
boolean | Paragraph-mark run (¶ glyph) bold / italic / strike / right-to-left flag |
markRPr.bold.cs / markRPr.italic.cs
|
boolean | Paragraph-mark run complex-script bold / italic (w:bCs,w:iCs) |
markRPr.rStyle |
string | Paragraph-mark run character style |
markRPr.underline |
string | Paragraph-mark run underline style |
markRPr.size / markRPr.size.cs
|
string | Paragraph-mark run font size / complex-script font size (unit-qualified pt) |
markRPr.color |
string | Paragraph-mark run color (scheme color name or #RRGGBB) |
markRPr.highlight |
string | Paragraph-mark run highlight color |
markRPr.font.latin / markRPr.font.ea / markRPr.font.cs
|
string | Paragraph-mark run Ascii / EastAsia / ComplexScript font |
markRPr.font.ascii / markRPr.font.hAnsi
|
string | Paragraph-mark run Ascii / HighAnsi font, surfaced separately only when the two slots diverge |
markRPr.font.hint |
string | Paragraph-mark run font slot hint (eastAsia / cs / default) |
markRPr.font.asciiTheme / markRPr.font.hAnsiTheme / markRPr.font.eaTheme / markRPr.font.csTheme
|
string | Paragraph-mark run theme font bindings |
markRPr.charSpacing |
string | Paragraph-mark run character spacing (unit-qualified pt) |
markRPr.kern |
integer | Paragraph-mark run kerning threshold (half-points) |
markRPr.lang.latin / markRPr.lang.ea / markRPr.lang.cs
|
string | Paragraph-mark run Latin / East-Asian / complex-script language tags (BCP-47) |
Paragraph nodes contain Run (r) child elements.
officecli get report.docx /body/p[1]/body/p[1] (Paragraph) (2 children)
style: Heading1
alignment: center
spaceAfter: 12pt
keepNext: true
keepLines: true
font: Calibri Light
size: 16pt
bold: true
color: #1F3864
officecli get report.docx /body/p[5]/body/p[5] (Paragraph) (1 children)
style: ListParagraph
alignment: left
leftindent: 720
hangingindent: 360
numid: 1
numlevel: 0
numFmt: bullet
Based on OfficeCLI v1.0.64