Jetformat

Insert a table of contents into Word

Use jetformat word toc to insert a table of contents into Word.

By Jetformat

The table of contents uses heading styles. Apply proper headings before adding a TOC; manually bold paragraphs do not establish the same outline structure.

Steps

  1. Start with a local DOCX. Replace the sample paths and identifiers with your own.
  2. Run the command below. Save to a new output path so the source remains available for comparison.
  3. Check the result as described below before using it in another job.
jetformat word toc report.docx --levels 1-3 -o report-updated.docx

Options for this task

Option Meaning
--levels Heading level range, for example 1-3 (default “1-3”)
--output Output DOCX path (required)

Check the result

Review the entries after saving and the page numbers after layout, especially if the document has changed length.

Notes and limits

Writing an Office document uses one credit per command. See the billing guide for the current rules.

The examples keep the original file. Add --force only when you intend to overwrite an existing output. Run jetformat word toc --help to compare options with your installed version.

See the word command reference for the surrounding workflow.

Last updated