title: C# Word Interop - "Find and replace" finds word but does not replace it
body: <p>The below code is able to find the text I'm looking for, but when I go to replace it, the text is not replaced. I get no exceptions.</p>
  
  <pre><code>var word = new Application();
  File.Delete(@"Your new test document.docx");
  File.Copy(@"Your test document.docx", @"Your new test document.docx");
  var document = word.Documents.Open(@"Your new test document.docx");
  document.Activate();
  
  while (document.Content.Find.Execute(FindText: "([Tag"))
  {
      var stringToReplace = document.Content.Text.Substring(document.Content.Text.IndexOf("([Tag"), document.Content.Text.IndexOf("])") + 2 - document.Content.Text.IndexOf("([Tag"));
      var replacement = stringToReplace.Replace("(", "").Replace(")", "");
  
      if (document.Content.Find.Execute(FindText: stringToReplace))
      {
          Console.WriteLine(stringToReplace);
          document.Content.Find.Execute(FindText: stringToReplace, ReplaceWith: replacement, Replace: WdReplace.wdReplaceOne);
      }
      else
          Console.WriteLine("Failed");
  }
  
  document.Close(true);
  word.Quit();
  Marshal.ReleaseComObject(document);
  Marshal.ReleaseComObject(word);
  Console.WriteLine("Done");
  Console.ReadLine();
  </code></pre>
  
  <p>To test the code:</p>
  
  <ol>
  <li>Create word document.</li>
  <li><p>Paste the following into it:</p>
  
  <p>([Tag FirstName] [Tag LastName])</p>
  
  <p>Address No.: 2</p>
  
  <p>Stackoverflow</p>
  
  <p>The pope who owns that rad car is named ([Tag FirstName], [Tag LastName])</p></li>
  <li>Save and update file paths in code.</li>
  </ol>