Open
Description
from docx import Document
from docx.enum.text import WD_ALIGN_PARAGRAPH
document = Document()
p=document.add_heading('GM_lag', 0)
p.add_run('bold').bold = True
p2=document.add_paragraph("content in a paragraph")
p2.alignment = WD_ALIGN_PARAGRAPH.RIGHT
document.save('c:\reg.docx')
The above python-docx code runs smoothly, but it still does not meet my requirement.
The default font size of a paragraph is 11 point, but I'd like change it to a more small font size, for I want to put many words in one page, and 9 points is very good for me, how can I change the default font size in creating document by python-docx?