Word can import and export HTML. The following line inserts an entire file into the current document:
>>> wordSelection.InsertFile(MYDIR + '\\tutorial.html') >>>
Furthermore, some experiments revealed that you don’t even need a full HTML document, just tagged text saved with the extension HTML.
So if you want an easy way to pump large amounts of text into a Word
document, generate the HTML and insert it. Python has an excellent
generating sophisticated markup from code. Word can import HTML
tables with reasonable success, and all of the standard HTML styles
are marked as styles in Word.
These days there is a need to produce both printed and online versions of documents. If you write code to generate the HTML, and then import it into a smart Word template with the right corporate header and footer, you have a complete solution.