You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
officecli set report.docx /toc[1] --prop levels=1-4 --prop hyperlinks=true
Word-side pitfall: real heading sources required
add --type toc never fails, even over paragraphs with no real heading — officecli doesn't validate this because populating a TOC needs a pagination engine Word alone has. But when Word itself opens the file and recalculates fields, a TOC built over paragraphs that are merely bold/large Normal text (not an actual Heading1–Heading9 style, or a custom style with outlineLvl set) renders "Error! No table of contents entries found." — verify the target paragraphs carry a real heading style (or outlineLvl) before adding a TOC over them, and set updateFields=true on / or /settings so Word recomputes the entries on open instead of showing a stale/empty write-time cache. There's no hand-written static-TOC fallback for page numbers — officecli can't compute pagination, so any static number would be a guess; defer to Word via updateFields or run refresh for what it can compute (SEQ, not page numbers).