FindReplaceOptions.IgnoreShapes
FindReplaceOptions IgnoreShapes property. Gets or sets a boolean value indicating either to ignore shapes within a text.
FindReplaceOptions.IgnoreShapes property
Gets or sets a boolean value indicating either to ignore shapes within a text.
The default value is false
.
public bool IgnoreShapes { get; set; }
Examples
Shows how to configure find/replace options to ignore matches in particular document elements.
ReplacerContext context = new ReplacerContext();
context.SetReplacement("findme", "Replacement Text");
context.FindReplaceOptions.IgnoreDeleted = true;
context.FindReplaceOptions.IgnoreFieldCodes = true;
context.FindReplaceOptions.IgnoreFields = true;
context.FindReplaceOptions.IgnoreFootnotes = true;
context.FindReplaceOptions.IgnoreInserted = true;
context.FindReplaceOptions.IgnoreShapes = true;
context.FindReplaceOptions.IgnoreStructuredDocumentTags = true;
Replacer.Create(context)
.From(MyDir + "Replacing.docx")
.To(ArtifactsDir + "Replacer.FindReplaceOptionsIgnore.docx")
.Execute();
See Also
- class FindReplaceOptions
- namespace Wordize.Replacing
- assembly Wordize