I am trying to programmatically merge two Microsoft Word files:
and:
I wrote a program with python-docx:
from docx import Document
t1 = Document("test1.docx")
t2 = Document("test2.docx")
for p in t2.paragraphs:
t1.add_paragraph(p.text,p.style)
t1.save("test1-new.docx")
I got this result:
As you can see, I got the text and the basic paragraph style, but lost the per-character style.
Is there any way to keep it?