[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.RangeBase

Class RangeBase

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Base class for Range and GrapeCity.Documents.Word.RangeBase.Body that allows manipulating content in a document.

public class RangeBase : ContentObjectCollection<ContentObject>, IContentList<ContentObject>, IReadOnlyList<ContentObject>, IReadOnlyCollection<ContentObject>, IEnumerable<ContentObject>, IEnumerable
Inheritance
object
RangeBase
Implements
System.Collections.Generic.IReadOnlyList<T><ContentObject>
System.Collections.Generic.IReadOnlyCollection<T><ContentObject>
System.Collections.Generic.IEnumerable<T><ContentObject>
System.Collections.IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Properties

BidirectionalOverrides

Gets the collection of bidirectional overrides included in this range.

public BidirectionalOverrideCollection BidirectionalOverrides { get; }

Property Value

BidirectionalOverrideCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Bookmarks

Gets the collection of bookmarks included in this range.

public BookmarkCollection Bookmarks { get; }

Property Value

BookmarkCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

CanvasShapes

Gets the collection of canvas shapes included in this range.

public CanvasShapeCollection CanvasShapes { get; }

Property Value

CanvasShapeCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Cells

Gets the collection of table cells included in this range.

public CellCollection Cells { get; }

Property Value

CellCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Comments

Gets the collection of comments included in this range.

public CommentCollection Comments { get; }

Property Value

CommentCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

ComplexFields

Gets the collection of complex fields included in this range.

public ComplexFieldCollection ComplexFields { get; }

Property Value

ComplexFieldCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

ContentControls

Gets the collection of content controls included in this range.

public ContentControlCollection ContentControls { get; }

Property Value

ContentControlCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Document

Gets the DocumentBase containing this range.

public DocumentBase Document { get; }

Property Value

DocumentBase

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

EditableRanges

Gets the collection of editable range objects included in this range.

public EditableRangeCollection EditableRanges { get; }

Property Value

EditableRangeCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

End

Gets the end marker of the range.

public Marker End { get; }

Property Value

Marker

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Endnotes

Gets the collection of endnotes included in this range.

public EndnoteCollection Endnotes { get; }

Property Value

EndnoteCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Footnotes

Gets the collection of footnotes included in this range.

public FootnoteCollection Footnotes { get; }

Property Value

FootnoteCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

GroupShapes

Gets the collection of group shapes included in this range.

public GroupShapeCollection GroupShapes { get; }

Property Value

GroupShapeCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Gets the collection of hyperlinks included in this range.

public HyperlinkCollection Hyperlinks { get; }

Property Value

HyperlinkCollection

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

InkShapes

Gets the collection of ink shapes included in this range.

public InkShapeCollection InkShapes { get; }

Property Value

InkShapeCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

IsAlive

Gets a value indicating whether this range is alive and can be used.

If this range is a PersistentRange, this property always returns true.

If this range is a Range (created by a call to GetRange()) it can become unusable if its content is deleted. In that case this property will return false.

public bool IsAlive { get; }

Property Value

bool

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

IsEmpty

Gets a value indicating whether this range is empty (does not contain any formattable content).

public bool IsEmpty { get; }

Property Value

bool

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

OMathElements

Gets the collection of OMathElement objects included in this range.

public OMathElementCollection OMathElements { get; }

Property Value

OMathElementCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

OMathMatrixRows

Gets the collection of OMathMatrixRow objects included in this range.

public OMathMatrixRowCollection OMathMatrixRows { get; }

Property Value

OMathMatrixRowCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

OMathParagraphs

Gets the collection of OMathParagraph objects included in this range.

public OMathParagraphCollection OMathParagraphs { get; }

Property Value

OMathParagraphCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

OMaths

Gets the collection of OMath objects included in this range.

public OMathCollection OMaths { get; }

Property Value

OMathCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

OMathStructs

Gets the collection of OMathStruct objects included in this range.

public OMathStructCollection OMathStructs { get; }

Property Value

OMathStructCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Paragraphs

Gets the collection of paragraphs included in this range.

public ParagraphCollection Paragraphs { get; }

Property Value

ParagraphCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Pictures

Gets the collection of pictures included in this range.

public PictureCollection Pictures { get; }

Property Value

PictureCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Rows

Gets the collection of table rows included in this range.

public RowCollection Rows { get; }

Property Value

RowCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Runs

Gets the collection of text runs included in this range.

public RunCollection Runs { get; }

Property Value

RunCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Sections

Gets the collection of sections included in this range.

public SectionCollection Sections { get; }

Property Value

SectionCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Shapes

Gets the collection of shapes included in this range.

public ShapeCollection Shapes { get; }

Property Value

ShapeCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

SimpleFields

Gets the collection of simple fields included in this range.

public SimpleFieldCollection SimpleFields { get; }

Property Value

SimpleFieldCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Start

Gets the start marker of the range.

public Marker Start { get; }

Property Value

Marker

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Tables

Gets the collection of tables included in this range.

public TableCollection Tables { get; }

Property Value

TableCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Text

Gets the text included in this range, as a string.

public string Text { get; }

Property Value

string

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

TextFrames

Gets the collection of text frames included in this range.

public TextFrameCollection TextFrames { get; }

Property Value

TextFrameCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Texts

Gets the collection of texts included in this range.

public TextCollection Texts { get; }

Property Value

TextCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Unknowns

Gets the collection of unknown objects included in this range.

public UnknownContentCollection Unknowns { get; }

Property Value

UnknownContentCollection

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

Methods

Clear()

Clears all content in this range, excluding bound markers.

public virtual void Clear()

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

ClearFormatting()

Clears formatting on content in this range.

Note that this method does not remove formatting applied indirectly via the content hierarchy.

public void ClearFormatting()

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

CompareLocationWith(RangeBase)

Compares this range location with another range location.

public LocationRelation CompareLocationWith(RangeBase range)

Parameters

range RangeBase

The range to compare this range with.

Returns

LocationRelation

A LocationRelation value representing the result of the comparison.

Remarks

Results returns compare that our current range applied on provided range. So, for example, result Contains mean our range contains provided range.

CopyTo(RangeBase, InsertLocation, FormattingCopyStrategy)

Copies this range to another range.

public Range CopyTo(RangeBase to, InsertLocation insertLocation, FormattingCopyStrategy copyStrategy = FormattingCopyStrategy.Copy)

Parameters

to RangeBase

The destination range.

insertLocation InsertLocation

The target location relative to the destination range.

copyStrategy FormattingCopyStrategy

Indicates whether to preserve the source formatting.

Returns

Range

A Range value representing the copied content.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

GetDrawings()

Gets the collection of all drawing objects (derived from ShapeBase) included in this range. Drawing objects include Picture, Shape, and unknow shape types.

public ContentObjectCollection<ShapeBase> GetDrawings()

Returns

ContentObjectCollection<ShapeBase>

The collection of all drawing objects in this range.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

GetInnerCollection<T>()

Creates and returns a collection of content objects in the current range. The returned collection differs from enumerating on the current range itself in that it does not include objects that start before the current range's start and end after the current range's end.

public ContentObjectCollection<T> GetInnerCollection<T>() where T : ContentObject

Returns

ContentObjectCollection<T>

The newly created ContentObjectCollection<T>.

Type Parameters

T

The type of items in the collection.

Remarks

See also remarks on RangeBase.

GetPersistentRange(ContentObject, ContentObject)

Creates and returns an instance of PersistentRange with bounds on the specified objects.

You should dispose the PersistentRange returned by this method when it is no longer needed. Failing to do so may lead to degraded performance.

public PersistentRange GetPersistentRange(ContentObject first, ContentObject last)

Parameters

first ContentObject

The first content object to include in the range.

last ContentObject

The last content object to include in the range.

Returns

PersistentRange

The newly created instance of PersistentRange.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

GetPersistentRange(Marker, Marker)

Creates and returns an instance of PersistentRange with bounds on the specified markers.

You should dispose the PersistentRange returned by this method when it is no longer needed. Failing to do so may lead to degraded performance.

public PersistentRange GetPersistentRange(Marker start, Marker end)

Parameters

start Marker

The marker where to start the range.

end Marker

The marker where to end the range.

Returns

PersistentRange

The newly created instance of PersistentRange.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

InsertOMathEquation(OMathBuiltInEquation, InsertLocation)

Inserts a built-in Office Math equation into the range.

public ContentObject[] InsertOMathEquation(OMathBuiltInEquation equation, InsertLocation location)

Parameters

equation OMathBuiltInEquation

The built-in equation to fill the OMath.

location InsertLocation

The target InsertLocation for the insertion.

Returns

ContentObject[]

The array of inserted ContentObject objects.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

MoveTo(RangeBase, InsertLocation, FormattingCopyStrategy)

Moves this range to another range.

public Range MoveTo(RangeBase to, InsertLocation insertLocation, FormattingCopyStrategy copyStrategy = FormattingCopyStrategy.Copy)

Parameters

to RangeBase

The destination range.

insertLocation InsertLocation

The target location relative to the destination range.

copyStrategy FormattingCopyStrategy

Indicates whether to preserve the source formatting.

Returns

Range

A Range value representing the moved content.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.

ToString()

Gets string representation of the range.

public override string ToString()

Returns

string

String representation of the range.

Remarks

A range's content is determined by its Start and End markers. Content objects that satisfy any of the following conditions are included in the range:

  • An object's start is positioned between the start and the end of the range.
  • An object's start is positioned on the start or on the end of the range.
  • An object's end is positioned between the start and the end of the range.
  • An object's end is positioned on the start or the end of the range.
  • An object's start is positioned before the start of the range and the object's end is positioned after the end of the range.
The GetInnerCollection<T>() method allows excluding objects that satisfy the last condition.