IgnoreOfficeMath
FindReplaceOptions.IgnoreOfficeMath property
Gets or sets a boolean value indicating either to ignore text inside OfficeMath/>. The default value is true
.
public bool IgnoreOfficeMath { get; set; }
Examples
Shows how to find and replace text within OfficeMath.
Document doc = new Document(MyDir + "Office math.docx");
Assert.That(doc.FirstSection.Body.FirstParagraph.GetText().Trim(), Is.EqualTo("i+b-c≥iM+bM-cM"));
FindReplaceOptions options = new FindReplaceOptions();
options.IgnoreOfficeMath = isIgnoreOfficeMath;
doc.Range.Replace("b", "x", options);
if (isIgnoreOfficeMath)
Assert.That(doc.FirstSection.Body.FirstParagraph.GetText().Trim(), Is.EqualTo("i+b-c≥iM+bM-cM"));
else
Assert.That(doc.FirstSection.Body.FirstParagraph.GetText().Trim(), Is.EqualTo("i+x-c≥iM+xM-cM"));
See Also
- class FindReplaceOptions
- namespace Aspose.Words.Replacing
- assembly Aspose.Words