Edit

Share via


TextRange2.Sentences[Int32, Int32] Property

Definition

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

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

Parameters

Start
Int32

The first sentence in the returned range.

Length
Int32

The number of sentences to be returned.

Property Value

TextRange2

Examples

This example formats as bold the second sentence in the second paragraph in shape two on slide one in the active PowerPoint presentation.

Remarks

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

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

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

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

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

Applies to