title: Replacing Word Document Text with Specific Font using VB.NET
body: <p>I'm having difficulties figuring out how to replace Text in a word document using a specific font.  I can get it to find and replace the text, but it is not using the Font i have specified.</p>
  
  <pre><code>Dim objWord As Word.Application
  Dim objDoc As Word.Document
  
  objWord = New Word.Application
  objWord.Visible = True
  objDoc = objWord.Documents.Open("C:\Users\John.USEI\Desktop\ME551i2.doc")
  objWord.Visible = True
  
  'objWord.ActiveWindow.Selection.Font.Name = "WASP LOGMARS MC"
  'objWord.ActiveWindow.Selection.Font.Size = "20"
  
  objDoc.Content.Find.Execute(FindText:="MAM", ReplaceWith:="L412F05050", Replace:=Word.WdReplace.wdReplaceAll)
  While objDoc.Content.Find.Execute(FindText:="  ", Wrap:=Word.WdFindWrap.wdFindContinue)
      objWord.ActiveWindow.Selection.Font.Name = "WASP LOGMARS MC"
      objWord.ActiveWindow.Selection.Font.Size = "20"
      objDoc.Content.Find.Execute(FindText:="  ", ReplaceWith:=" ", Replace:=Word.WdReplace.wdReplaceAll, Wrap:=Word.WdFindWrap.wdFindContinue)
  End While
  </code></pre>
  
  <p>I've tried setting the font before the While loop (currently commented out) and tried it within the loop. (current code)</p>
  
  <p>Is it possible to specify what font to replace with?</p>