title: Programmatically merge two docx file with Python, keeping the character styles within the merged paragraph
body: <p>I am trying to programmatically merge two Microsoft Word files:</p>
  
  <p><a href="https://i.stack.imgur.com/eRzT3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/spbFE.png" alt="enter image description here"></a></p>
  
  <p>and:</p>
  
  <p><a href="https://i.stack.imgur.com/spbFE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eRzT3.png" alt="enter image description here"></a></p>
  
  <p>I wrote a program with python-docx:</p>
  
  <pre><code>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")
  </code></pre>
  
  <p>I got this result:</p>
  
  <p><a href="https://i.stack.imgur.com/snsAD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/snsAD.png" alt="enter image description here"></a></p>
  
  <p>As you can see, I got the text and the basic paragraph style, but lost the per-character style.</p>
  
  <p>Is there any way to keep it?</p>