Open AndyChenrun opened 2 months ago
I had tried like below: from docx import Document
document = Document("example.docx") for run in document.runs: run.font.name = "Arial" run.font.size = Pt(12) run.font.color.rgb = RGBColor(0x42, 0x24, 0xE9)
document.save("modified_example.docx")
this code does not work fine.
Describe your problem
In the MacOS environment, use the docxtpl {{}} method to insert text into the template. Unfortunately, the font is incorrect. How to solve it?
More details about your problem
1.Open template.doc