Object Model Reference : Classes : T : TextRange : Properties : TextRange.Words |
Property Words As TextWords
Member of TextRange
The Words property returns all the words in a text range.
The Words property returns a read-only value.
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 |
Copyright 2013 Corel Corporation. All rights reserved.