Skip to content

word paragraph get

zmworm edited this page Mar 18, 2026 · 51 revisions

Word: Paragraph - get

Returned attributes when getting a paragraph element.

Path: /body/p[N]

Returned Attributes

Key Type Description
style string Paragraph style name
alignment string Alignment (left, center, right, both)
spacebefore integer Space before paragraph (twips)
spaceafter integer Space after paragraph (twips)
linespacing integer Line spacing value
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
keeplines boolean Keep lines together
pagebreakbefore boolean Page break before paragraph
widowcontrol boolean Widow/orphan control
shading string Shading fill color
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

Children

Paragraph nodes contain Run (r) child elements.

Example

officecli get report.docx /body/p[1]
/body/p[1] (Paragraph) (2 children)
  style: Heading1
  alignment: center
  spaceafter: 240
  keepnext: true
  keeplines: true
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.6

Clone this wiki locally