API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.Length property
The length of the range in characters
Syntax:
Property Get Length() As Long
Property Let Length(ByVal Value As Long)
Remarks:
The Length property returns the number of characteres in a text range.
Examples:
The following VBA example displays the number of characters in the paragraph.
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 for length")
Set t = s.Text
MsgBox "The length of the characters in the paragraph text is " & _
  t.Story.Length 
End Sub