Object Model Reference : Classes : T : TextRange : Methods : TextRange.SetRange |
Sub SetRange(Start As Long, End As Long)
Member of TextRange
The SetRange method sets the starting and ending positions of a text range.
The following VBA example underlines the text range that includes the third-to-tenth characters.
Sub Test() |
Dim s As Shape |
Dim tr As TextRange |
Dim d As Document |
Set d = CreateDocument |
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, _ |
"This is an example") |
Set tr = s.Text.Story |
tr.SetRange 3, 10 |
tr.Underline = cdrDoubleThinFontLine |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.