Edit

Share via


TextRange2.Lines[Int32, Int32] Property

Definition

Returns the specified subset of text lines. Read-only.

public:
 property Microsoft::Office::Core::TextRange2 ^ Lines[int, int] { Microsoft::Office::Core::TextRange2 ^ get(int Start, int Length); };
public Microsoft.Office.Core.TextRange2 Lines[int Start = -1, int Length = -1] { get; }
member this.Lines(int * int) : Microsoft.Office.Core.TextRange2
Public ReadOnly Property Lines(Optional Start As Integer = -1, Optional Length As Integer = -1) As TextRange2

Parameters

Start
Int32

The first line in the returned range.

Length
Int32

The number of lines to be returned.

Property Value

TextRange2

Remarks

If both Start and Length are omitted, the returned range starts with the first line and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one line.

If Length is specified but Start is omitted, the returned range starts with the first line in the specified range.

If Start is greater than the number of lines in the specified text, the returned range starts with the last line in the specified range.

If Length is greater than the number of lines from the specified starting line to the end of the text, the returned range contains all those lines.

Applies to