I am trying to get this document to change the font size but it keeps saying Pt() is not defined.
I have this:
import docx
doc = docx.Document(r"C:\Users\jconshick\Desktop\CodeTest\Spellbook.docx")
para = doc.add_paragraph('').add_run("This is a test")
para.font.size = Pt(12)
doc.save(r"C:\Users\jconshick\Desktop\CodeTest\Spellbook.docx")
I keep getting that Pt() is not defined though all the documentation shows this is how is should be. Not sure if it matters but I am using Spyder.