API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.Words property
Collection of all words in the range
Syntax:
Property Get Words() As TextWords
Remarks:
The Words property returns all the words in a text range.
Examples:
The following VBA example underlines the last word of the paragraph and applies bold formatting to the first word.
Sub Test()
Dim d As Document
Dim s As Shape
Dim t As Text
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, "This is an example.")
Set t = s.Text
t.Story.Words.Last.Underline = cdrDoubleThinFontLine
t.Story.Words.First.Bold = True 
End Sub