Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Properties : TextRange.Words


TextRange.Words

Property Words As TextWords

Description

Member of TextRange

The Words property returns all the words in a text range.

The Words property returns a read-only value.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.