I am trying to create a Finance Log, however I canot change the font size from one size to another without the entire font size of all the text changing.
I want "Finance Log" and "Created On..." to be in 48 and "Log Begins:" to be in 24.
Tstyle = doc.styles['Normal']
font = Tstyle.font
font.name = "Nunito Sans"
font.size = Pt(48)
Title = doc.add_paragraph()
TRun = Title.add_run("Finance Log")
TRun.bold = True
CurrentDate= datetime.datetime.now()
FormattedDate= CurrentDate.strftime('%d-%m-%Y')
FCreated = Title.add_run("\nFile Created On "+FormattedDate)
Fstyle = doc.styles['Heading 1']
font = Fstyle.font
font.name = "Nunito Sans"
font.size = Pt(24)
FLog = doc.add_paragraph()
FinanceTitle = FLog.add_run("Log Begins:")
doc.save(path_to_docx)
I have tried multiple things such as creating a new style, setting the new style to a heading etc...
I am aware of Set paragraph font in python-docx however I could not resolve the problem from this