Answer the question
In order to leave comments, you need to log in
How to find and replace text in a Microsoft Word table?
Good evening! Tell. I have a table in Word (business cards). I need to find all "Name" values in cells and replace them with "EdName" (for example). Through the normal method search, the paragraph is not obtained. Here is the code:
import docx
document = docx.Document("doccc.docx")
for table in document.tables:
table.text = table.text.replace("Name", "Абра Кадабра")
document.save("doccc.docx")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question