Previous Document Next Document
TextRange.Length

Property Length As Long

Member of TextRange

The Length property returns the number of characteres in the range.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.