word document python code example Example: open word document python from docx import Document document = Document() document.save('test.docx')