FindReplaceOptions Class |
Namespace: Aspose.Words.Replacing
The FindReplaceOptions type exposes the following members.
Name | Description | |
---|---|---|
![]() | FindReplaceOptions | Initializes a new instance of the FindReplaceOptions class |
![]() | FindReplaceOptions(FindReplaceDirection) | Initializes a new instance of the FindReplaceOptions class |
![]() | FindReplaceOptions(IReplacingCallback) | Initializes a new instance of the FindReplaceOptions class |
![]() | FindReplaceOptions(FindReplaceDirection, IReplacingCallback) | Initializes a new instance of the FindReplaceOptions class |
Name | Description | |
---|---|---|
![]() ![]() | ApplyFont |
Text formatting applied to new content.
|
![]() ![]() | ApplyParagraphFormat |
Paragraph formatting applied to new content.
|
![]() ![]() | Direction |
Selects direction for replace. Default value is Forward.
|
![]() ![]() | FindWholeWordsOnly |
True indicates the oldValue must be a standalone word.
|
![]() | IgnoreDeleted |
Gets or sets a boolean value indicating either to ignore text inside delete revisions.
The default value is false.
|
![]() | IgnoreFields |
Gets or sets a boolean value indicating either to ignore text inside fields.
The default value is false.
|
![]() | IgnoreInserted |
Gets or sets a boolean value indicating either to ignore text inside insert revisions.
The default value is false.
|
![]() ![]() | MatchCase |
True indicates case-sensitive comparison, false indicates case-insensitive comparison.
|
![]() ![]() | PreserveMetaCharacters |
True indicates that meta-characters beginning with "&" are preserved.
Default value is false.
|
![]() ![]() | ReplacingCallback |
The user-defined method which is called before every replace occurrence.
|
![]() ![]() | UseLegacyOrder |
True indicates that a text search is performed sequentially from top to bottom considering the text boxes.
Default value is false.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
// Open the document Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln("Hello _CustomerName_,"); // Check the document contains what we are about to test Console.WriteLine(doc.FirstSection.Body.Paragraphs[0].GetText()); FindReplaceOptions options = new FindReplaceOptions(); options.MatchCase = false; options.FindWholeWordsOnly = false; // Replace the text in the document doc.Range.Replace("_CustomerName_", "James Bond", options); // Save the modified document doc.Save(ArtifactsDir + "Range.ReplaceSimple.docx");