title: using win32com.client in python how to find and replace multiple text
body: <p>I'm trying to add multiple string values to a Word document using find and replace with the <a href="http://sourceforge.net/projects/pywin32/" rel="noreferrer">win32com.client</a> Python library. </p>
  
  <p>I can find and replace one value, but I don't know how to do this for multiple values.  </p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>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)
  
  # the following part doesn't run
  find.Text = "Last Name"             
  find.Replacement.Text = "Smith"
  find.Execute(Replace=1, Forward=True)
  
  word.ActiveDocument.SaveAs('C:\TEMP\Testing\Me2.docx')
  word.Quit() # releases Word object from memory
  </code></pre>
  
  <p>Any suggestions?</p>