public void ReplaceSimple()
{
//ExStart
//ExFor:Range.Replace(String,String,Boolean,Boolean)
//ExSummary:Simple find and replace operation.
// Open the document.
Document doc = new Document(MyDir + "Range.ReplaceSimple.doc");
// Check the document contains what we are about to test.
Console.WriteLine(doc.FirstSection.Body.Paragraphs[0].GetText());
// Replace the text in the document.
doc.Range.Replace("_CustomerName_", "James Bond", false, false);
// Save the modified document.
doc.Save(MyDir + @"\Artifacts\Range.ReplaceSimple.doc");
//ExEnd
Assert.AreEqual("Hello James Bond,\r\x000c", doc.GetText());
}