How To Use Python To Use Microsoft Word
How To Use Python To Use Microsoft Word
document = Document()
document.add_heading('Document Title', 0)
document.add_paragraph(
'first item in unordered list', style='List Bullet'
)
document.add_paragraph(
'first item in ordered list', style='List Number'
)
document.add_picture('monty-truth.png', width=Inches(1.25))
records = (
(3, '101', 'Spam'),
(7, '422', 'Eggs'),
(4, '631', 'Spam, spam, eggs, and spam')
)
document.add_page_break()
document.save('demo.docx')