I am trying to add multiple string values ββto a Word document using find and replace using the win32com.client Python library.
I can find and replace a single value, but I do not know how to do this for multiple values.
This is what I still have:
import win32com.client word = win32com.client.DispatchEx("Word.Application") word.Visible = True word.DisplayAlerts = 0 word.Documents.Open("C:\TEMP\Testing\Me.docx") word.Selection.Find find.Text = "First Name" find.Replacement.Text = "John" find.Execute(Replace=1, Forward=True)
Any suggestions?
python ms-word
user224611
source share