Skip to content

word toc add

zmworm edited this page Apr 29, 2026 · 51 revisions

Word: Table of Contents - add

Add an auto-generated table of contents based on heading levels.

Parent: /body

Properties

Property Default Description
levels 1-3 Heading levels
title - TOC heading
hyperlinks true Hyperlinks
pageNumbers true Page numbers

Examples

officecli add report.docx /body --type toc --prop levels=1-3 --prop title="Table of Contents" --index 0

Based on OfficeCLI v1.0.64

Clone this wiki locally