OfficeIMO

API Reference

Class

WordTextSegment

Namespace OfficeIMO.Word

Represents a continuous text fragment within a document and exposes its start and end positions.

Inheritance

  • Object
  • WordTextSegment

Constructors

WordTextSegment 3 overloads
WordTextSegment() #

Initializes a new instance of the WordTextSegment class with both positions set to the start of the document.

WordTextSegment(System.Int32 beginRun, System.Int32 endRun, System.Int32 beginText, System.Int32 endText, System.Int32 beginChar, System.Int32 endChar) #

Initializes a new instance of the WordTextSegment class with explicit position values.

Parameters

beginRun System.Int32 required
Paragraph index for the start of the segment.
endRun System.Int32 required
Paragraph index where the segment ends.
beginText System.Int32 required
Text index within the starting paragraph.
endText System.Int32 required
Text index within the ending paragraph.
beginChar System.Int32 required
Character index within the starting text.
endChar System.Int32 required
Character index within the ending text.
WordTextSegment(OfficeIMO.Word.WordPositionInParagraph beginPos, OfficeIMO.Word.WordPositionInParagraph endPos) #

Initializes a new instance of the WordTextSegment class using the supplied begin and end positions.

Parameters

beginPos OfficeIMO.Word.WordPositionInParagraph required
Starting position of the segment.
endPos OfficeIMO.Word.WordPositionInParagraph required
Ending position of the segment.

Properties

BeginPos #

Gets or sets the starting position of the text segment.

EndPos #

Gets the ending position of the text segment.

BeginIndex #

The index of the begin paragraph

BeginChar #

The index of the start text character

EndIndex #

The index of the end paragraph

EndChar #

the index of the end text character