Guides¶
One page per capability, organised around what you are trying to do. Each guide gives you working code first, then the traps, then links to the concept page explaining why the format behaves that way and to the module reference for full signatures.
New here? Read Getting started first — it covers the conventions every one of these guides assumes.
Which guide do I need?¶
| I want to… | Guide |
|---|---|
| Find out why a paragraph looks the way it does; create, apply, or change styles; audit a whole document's formatting | Styles and the cascade |
| Build a fillable form with text boxes, dropdowns, date pickers, checkboxes; read the values back; lock the document | Forms and protection |
| Leave review comments anchored to specific text; reply to them; resolve and reopen threads | Comments |
| Mark insertions and deletions as tracked changes; read revisions; accept or reject them | Tracked changes |
| Add a table of contents, numbered figure/table captions, or a table of figures | Publishing |
| Add footnotes or endnotes, and edit them later | Footnotes and endnotes |
| Bookmark a heading and point a cross-reference at it | Bookmarks and cross-references |
| Insert page numbers, dates, or a raw field; make Word recalculate them | Fields |
| Set up multi-column sections, mid-document section breaks, distinct even/odd headers, line numbers, page borders | Page layout |
| Define bullet or multi-level numbered lists, apply them, restart numbering | Lists and numbering |
| Put borders and shading on tables; merge and unmerge cells | Tables |
| Audit an inherited document for formatting defects, and plan the repair | Linting |
Common combinations¶
A few things need more than one module. These are the ones people hit:
- A report with a working TOC — publishing for the
TOC and captions, styles to make sure the headings carry
real outline levels, and one
mark_fields_dirtycall from fields before you save. - A fillable, locked form — forms covers both halves:
FormBuilderto place the controls andprotect_document(mode="forms")to stop readers editing anything else. - A review pass on someone else's document — linting to find what's wrong, styles to reconcile the style ids, and comments or tracked changes to record what you changed.
- A legal or contract document — layout for line numbering, notes for footnotes, bookmarks for clause cross-references.