Word Document Manipulation with python-docx
This skill covers robust Word template manipulation with python-docx,
including split placeholders, headers/footers, nested tables, and
conditional sections.
How to Use This Skill
The complete, actionable workflow for this skill lives in the companion
file DOCX_WORKFLOW_GUIDE.pdf. That document contains every concrete
procedure, code example, and step-by-step guide you need to use this
skill. You must read DOCX_WORKFLOW_GUIDE.pdf in full before beginning any
template-fill task; this SKILL.md is an index, not a standalone guide.
Scope
This skill covers:
- Replacing
{{PLACEHOLDER}}tokens in.docxtemplates. - Handling placeholders split across multiple XML runs.
- Traversing headers, footers, and nested tables.
- Evaluating
{{IF_...}} ... {{END_IF_...}}conditional blocks.
Refer to DOCX_WORKFLOW_GUIDE.pdf for the detailed procedures.