title: How to replace double quotes in Microsoft WORD using C#
body: <p>Following successfully replaces <code>Apple</code> with <code>Mango</code> in a <code>WORD</code> document if it has the word <code>Apple</code>:</p>
  
  <pre><code>myDocRange.Find.Execute(FindText: "Apple", Format: false, ReplaceWith: "Mango", MatchWildcards: true, Replace: Word.WdReplace.wdReplaceAll);
  </code></pre>
  
  <p>But if the document has a double quote <code>"</code> and you want to replace it with <code>TEST</code>, following does nothing:</p>
  
  <pre><code>myDocRange.Find.Execute(FindText: "\"", Format: false, ReplaceWith: "TEST", MatchWildcards: true, Replace: Word.WdReplace.wdReplaceAll);
  </code></pre>
  
  <p><strong>Remark</strong>: Instead of using <code>"\""</code>, if I use <code>""""</code> or <code>@"""</code> I get a syntax error.</p>
  
  <p>However, following works in <code>VBA</code>. But I need it to work in <code>C#</code>:</p>
  
  <pre><code>Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  With Selection.Find
      .Text = """"
      .Replacement.Text = "TEST"
      .Forward = True
      .Wrap = wdFindContinue
      .Format = False
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
  End With
  Selection.Find.Execute Replace:=wdReplaceAll
  </code></pre>