FindReplaceOptions Class
Wordize.Replacing.FindReplaceOptions class. Specifies options for find/replace operations.
FindReplaceOptions class
Specifies options for find/replace operations.
public class FindReplaceOptions
Constructors
| Name | Description |
|---|---|
| FindReplaceOptions() | The default constructor. |
Properties
| Name | Description |
|---|---|
| FindWholeWordsOnly { get; set; } | True indicates the oldValue must be a standalone word. |
| IgnoreDeleted { get; set; } | Gets or sets a boolean value indicating either to ignore text inside delete revisions. The default value is false. |
| IgnoreFieldCodes { get; set; } | Gets or sets a boolean value indicating either to ignore text inside field codes. The default value is false. |
| IgnoreFields { get; set; } | Gets or sets a boolean value indicating either to ignore text inside fields. The default value is false. |
| IgnoreFootnotes { get; set; } | Gets or sets a boolean value indicating either to ignore footnotes. The default value is false. |
| IgnoreInserted { get; set; } | Gets or sets a boolean value indicating either to ignore text inside insert revisions. The default value is false. |
| IgnoreShapes { get; set; } | Gets or sets a boolean value indicating either to ignore shapes within a text. |
| IgnoreStructuredDocumentTags { get; set; } | Gets or sets a boolean value indicating either to ignore content of SDT. The default value is false. |
| MatchCase { get; set; } | True indicates case-sensitive comparison, false indicates case-insensitive comparison. |
| ReplacementFormat { get; set; } | Specifies format of the replacement. Default is Text. |
| UseSubstitutions { get; set; } | Gets or sets a boolean value indicating whether to recognize and use substitutions within replacement patterns. The default value is false. |
Examples
Shows how to replace text in the document using customized find/replace options.
FindReplaceOptions options = new FindReplaceOptions();
options.MatchCase = true;
options.FindWholeWordsOnly = true;
int replacements = Replacer.Replace(MyDir + "Replacing.docx",
ArtifactsDir + "Replacer.Replace1.docx",
SaveFormat.Docx,
"findme",
"Replacement Text",
options);
See Also
- namespace Wordize.Replacing
- assembly Wordize