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