Range

Overview

Range is a class in Aspose.Words FOSS for .NET. Inherits from: IEnumerable<Node>.

Represents a contiguous area in a document.

This class provides 10 methods for working with Range objects in .NET programs. Available methods include: Delete, GetEnumerator, NormalizeFieldTypes, Replace, ToDocument, UnlinkFields, UpdateFields. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: Bookmarks, Fields, FormFields, Revisions, StructuredDocumentTags, Text.

Properties

NameTypeAccessDescription
TextstringReadGets the text of the range.
FormFieldsFormFieldCollectionReadReturns a FormFields collection that represents all form fields in the range.
BookmarksBookmarkCollectionReadReturns a Bookmarks collection that represents all bookmarks in the range.
FieldsFieldCollectionReadReturns a Fields collection that represents all fields in the range.
StructuredDocumentTagsStructuredDocumentTagCollectionReadReturns a StructuredDocumentTags collection that represents all structured document tags in the range.
RevisionsRevisionCollectionReadGets a collection of revisions (tracked changes) that exist in this range.

Methods

SignatureDescription
Delete()Deletes all characters of the range.
Replace(pattern: string, replacement: string)Replaces all occurrences of a specified character string pattern with a replacement string.
Replace(pattern: Regex, replacement: string)Replaces all occurrences of a character pattern specified by a regular expression with another string.
Replace(pattern: string, replacement: string, options: FindReplaceOptions)Replaces all occurrences of a specified character string pattern with a replacement string.
Replace(pattern: Regex, replacement: string, options: FindReplaceOptions)Replaces all occurrences of a character pattern specified by a regular expression with another string.
UpdateFields()Updates the values of document fields in this range.
UnlinkFields()Unlinks fields in this range.
NormalizeFieldTypes()Changes field type values FieldType of FieldStart, FieldSeparator, FieldEnd in this range so that they correspond to the field types contained in the field codes.
ToDocument()Constructs a new fully formed document that contains the range.
GetEnumerator()Calls GetEnumerator on this Range instance.

See Also