Skip to content

word header footer set

zmworm edited this page Apr 4, 2026 · 52 revisions

Word: Header/Footer - set

Modify header and footer content and formatting.

Path: /header[N], /footer[N]

Properties

Property Accepted Values Description
text text Content
font, size, bold, italic, color various Formatting
alignment left, center, right, justify Alignment
highlight color name Highlight color
underline underline style Underline style
strike bool Strikethrough

Notes

  • Header/footer type values use OOXML internal text (default, first, even) instead of SDK enum names.

Examples

officecli set report.docx /header[1] --prop text="Updated Header" --prop alignment=center

Based on OfficeCLI v1.0.34

Clone this wiki locally