#!/usr/bin/env python3 from docx import Document from docx.shared import RGBColor doc = Document() # empty docx object t1="Freiheit" t2="Niemand hat die Absicht, \ eine Brandmauer zu errichten." hdg=doc.add_heading('',2).add_run(t1) hdg.font.name = 'Arial' hdg.font.color.rgb = RGBColor(0,0,0) par=doc.add_paragraph().add_run(t2) par.font.name = 'Arial' par.font.color.rgb = RGBColor(0,0,0) doc.save("walter.docx") # -> file