Sentences Property

Microsoft Word Visual Basic

Returns a Sentences collection that represents all the sentences in the range, selection, or document. Read-only.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example copies the first sentences in the active document.

ActiveDocument.Sentences(1).Copy
		

This example deletes the last sentence in the active document.

ActiveDocument.Sentences.Last.Delete
		

This example displays the number of sentences in the first paragraph in the active document.

MsgBox ActiveDocument.Paragraphs(1).Range _
    .Sentences.Count & " sentences"