title: How to search for a specific font in a Word document with iterop
body: <p>I use something like this:</p>
  
  <pre><code>doc.Content.Find.Font.Name = "Times New Roman";
  </code></pre>
  
  <p>but when I step through the code the Name property doesn't change.
  thanks.   </p>
  
  <hr>
  
  <p>I'm working with VS2010 and MS Word 2007 and I want to find and replace all "Times New Roman" fonts with "Arial".</p>
  
  <p>Here's what happens:</p>
  
  <pre><code>Word.Application wordApp = new Word.Application();
  Word.Documents docs = wordApp.Documents;
  doc = docs.Open(fileName, Visible: false);
  doc.Content.Find.ClearFormatting();
  doc.Content.Find.Replacement.ClearFormatting();
  
  // Here the value of Find.Font.Name and Replacement.Font.Name is ""
  
  doc.Content.Find.Font.Name = "Times New Roman";
  doc.Content.Find.Replacement.Font.Name = "Arial";
  
  // The value of Find.Font.Name and Replacement.Font.Name still "" !!!
  
  doc.Content.Find.Execute(Format: true, Replace: Word.WdReplace.wdReplaceAll);
  </code></pre>