Share via


TextRange2.Sentences Property

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

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
ReadOnly Property Sentences ( _
    Start As Integer, _
    Length As Integer _
) As TextRange2
    Get
'Usage
Dim instance As TextRange2
Dim Start As Integer
Dim Length As Integer
Dim value As TextRange2

value = instance.Sentences(Start, Length)
TextRange2 this[
    int Start,
    int Length
] { get; }

Parameters

  • Start
    Type: System.Int32

    The first sentence in the returned range.

  • Length
    Type: System.Int32

    The number of sentences to be returned.

Property Value

Type: Microsoft.Office.Core.TextRange2
TextRange2

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.

Examples

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

See Also

Reference

TextRange2 Interface

TextRange2 Members

Microsoft.Office.Core Namespace