May-12-2021, 10:55 AM
I want to put runs in one paragraph to another using , so I write code like this: But it does not work. How should I change this code?
from docx import Document
import re
master = Document("out.docx")
po = master.add_paragraph('It is: ')
doc = Document("in4.docx")
for p in doc.paragraphs:
if re.search('yyy', p.text):
for r in p.runs:
master.paragraphs[-1].runs.append(r)
master.save('out1.doc1') Thanks!
