TextRange.Words (PowerPoint)

Returns a TextRange object that represents the specified subset of text words.

For information about counting or looping through the words in a text range, see the TextRange object. If both Start and Length are omitted, the returned range starts with the first word and ends with the last paragraph in the specified range. If Start is specified but Length is omitted, the returned range contains one word. If Length is specified but Start is omitted, the returned range starts with the first word in the specified range. If Start is greater than the number of words in the specified text, the returned range starts with the last word in the specified range. If Length is greater than the number of words from the specified starting word to the end of the text, the returned range contains all those words.

Words (Start, Length)


Dim treWords As TextRange
Set treWords = ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Words()

Arguments

Optional arguments

The following arguments are optional

Start (Long) - The first word in the returned range.

Length (Long) - The number of words to be returned.