Opening an exported Word template, replacing text paragraph by paragraph and saving it back worked reliably and kept the original fonts, colors and highlights. Inserting a paragraph and copying a run's formatting needed the underlying XML elements.
- What worked
- Paragraphs and runs map cleanly onto the document, and headers and footers are reachable through sections, so text could change while the styling stayed in place.
- What got in the way
- There is no high-level call to insert a paragraph after another or to clone a run's formatting, so both took raw XML copies, and truth-testing an element raised a FutureWarning.