-
Notifications
You must be signed in to change notification settings - Fork 559
word paragraph add
zmworm edited this page Apr 9, 2026
·
53 revisions
Add a paragraph to the document body, headers, footers, or table cells.
Parent: /body, /header[N], /footer[N], table cells
| Property | Default | Description |
|---|---|---|
text |
(empty) | Paragraph text |
style |
- | Style ID (e.g., Heading1, Normal) |
alignment |
- |
left, center, right, justify
|
font, size, bold, italic, color
|
- | Text formatting |
listStyle |
- |
bullet, numbered, none
|
start |
- | List start number |
numId, numLevel
|
- | Numbering definition |
listLevel/level
|
- | List nesting level (0-based) |
firstLineIndent |
- | First line indent (inches) |
leftIndent/indentLeft/indent, rightIndent/indentRight, hangingIndent
|
- | Indents (twips) |
spaceBefore, spaceAfter, lineSpacing
|
- | Spacing |
shading/shd
|
- | Background (fill or val;fill or val;fill;color) |
underline, strike/strikethrough, highlight
|
- | Text decoration |
caps, smallCaps
|
- | Capitalization |
superscript, subscript
|
- | Vertical alignment |
keepNext, keepLines, pageBreakBefore, widowControl
|
- | Flow control |
pbdr.* |
- | Paragraph borders (style;size;color;space), supports .top, .bottom, .left, .right, .between, .bar, .all
|
# Add a heading
officecli add report.docx /body --type paragraph --prop text="Chapter 1" --prop style=Heading1
# Add body text
officecli add report.docx /body --type paragraph --prop text="This is body text." --prop font=Arial --prop size=12
# Add a bulleted list item
officecli add report.docx /body --type paragraph --prop text="First item" --prop listStyle=bullet
# Add a numbered list starting at 5
officecli add report.docx /body --type paragraph --prop text="Step five" --prop listStyle=numbered --prop start=5
# Insert at a specific position (0-based)
officecli add report.docx /body --type paragraph --prop text="Inserted paragraph" --index 0
# Add centered paragraph with background
officecli add report.docx /body --type paragraph --prop text="Notice" --prop alignment=center --prop shd=FFFF00Based on OfficeCLI v1.0.40