Skip to content

word section add

goworm edited this page Jun 26, 2026 · 54 revisions

Word: Section - add

Add a section break controlling page layout for a range of content.

Parent: /body

Properties

Property Default Description
type nextPage continuous, evenPage, oddPage, nextPage
pageWidth/width - Page width (integer, twips)
pageHeight/height - Page height (integer, twips)
orientation - landscape or portrait
direction / dir / bidi - rtl writes <w:bidi/> on sectPr in canonical schema order; ltr clears it
rtlGutter - bool. RTL binding-gutter flag (<w:rtlGutter/>); mirrors Set
marginHeader - Header-from-top-edge distance (pgMar @header)
marginFooter - Footer-from-bottom-edge distance (pgMar @footer)
marginGutter - Binding gutter width (pgMar @gutter)
lineNumbers - continuous, restartPage/page, restartSection/section (<w:lnNumType>)
lineNumberCountBy - Line numbering interval (every Nth line); only emitted when > 1
lineNumberDistance - Gutter twips between line-number column and body text (<w:lnNumType w:distance>)
pgBorders - Page-border shorthand: box (4pt all sides) or none (strips)
pgBorders.top / .left / .bottom / .right - Per-side page border, STYLE[;SIZE[;COLOR[;SPACE]]]
pgBorders.offsetFrom - page or text — border measured from page edge or text margin
pgBorders.zOrder - front (default) or back — border drawn in front of or behind page text
pgBorders.display - allPages, firstPage, notFirstPage
paperSrc.first - Printer paper-source bin for the first page (int 0-65535)
paperSrc.other - Printer paper-source bin for remaining pages (int 0-65535)
formProt - bool. Section form-protection (<w:formProt>); locks content except form fields
footnotePr.numFmt - decimal/lowerRoman/upperRoman/lowerLetter/upperLetter/chicago (<w:footnotePr><w:numFmt>)
footnotePr.numRestart - continuous, eachSect, eachPage (<w:footnotePr><w:numRestart>)
footnotePr.numStart - Footnote starting number (<w:footnotePr><w:numStart>)
footnotePr.pos - pageBottom, beneath, sectEnd (<w:footnotePr><w:pos>)
endnotePr.numFmt - decimal/lowerRoman/upperRoman/lowerLetter/upperLetter/chicago (<w:endnotePr><w:numFmt>)
endnotePr.numRestart - continuous, eachSect, eachPage (<w:endnotePr><w:numRestart>)
endnotePr.numStart - Endnote starting number (<w:endnotePr><w:numStart>)
endnotePr.pos - sectEnd or docEnd (<w:endnotePr><w:pos>)

Examples

officecli add report.docx /body --type section --prop type=continuous
officecli add report.docx /body --type section --prop type=nextPage --prop orientation=landscape

# RTL section break
officecli add report.docx /body --type section --prop type=nextPage --prop direction=rtl

Based on OfficeCLI v1.0.68

Clone this wiki locally