title: Execute Find and Replace function in an open Word document from Excel
body: <p>From within Excel, I need to open a Word document (I succeeded at this) and then perform (programatically) a Find/Replace inside that document (No success at this).</p>
  
  <p>The reason to use an Excel macro is that the replacement text is taken from some Excel cells.</p>
  
  <pre><code>Sub Word_find_replace_attempt_from_Excel()
  
      Set WordApp = CreateObject("Word.Application")
      WordApp.Visible = True
      Set WordDoc = WordApp.Documents.Open("C:\Test.doc") 'it exists already
      With WordDoc
          Find.Execute _
              FindText:="a", _
              ReplaceWith:="b", _
              Replace:=wdReplaceAll
      End with
  End Sub
  </code></pre>