Previous Document Next Document

Object Model Reference : Classes : T : Text : Methods : Text.Range


Text.Range

Function Range(Start As Long, End As Long) As TextRange

Description

Member of Text

The Range method returns a range of text characters.

Parameter
Description
Start
Specifies the starting character in the text range
End
Specifies the ending character in the text range

VBA example

The following VBA example creates an artistic-text object and displays the first-to-fifth characters in a message box. The ninth-to-fourteenth characters are capitalized.

Sub Test()
 Dim t As Text
 Dim s As Shape
 Dim d As Document
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateArtisticText(4, 5, "This is a test.")
 Set t = s.Text
 MsgBox "The text between characters 1 and 5 is: " & vbCr & t.Range(1, 5).Text
 t.Range(9, 14).Case = cdrAllCapsFontCase
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.