API Documentation > CorelDRAW > 2025-v26 > Text > IVGText
Text.Range method
Gets a range of characters
Syntax:
Function Range(ByVal Start As Long, ByVal End As Long) As TextRange
Parameters:
Name Type Description
Start
Long
End
Long
Remarks:
The Range method returns a range of text characters.
Examples:
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