Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Properties : TextRange.Length


TextRange.Length

Property Length As Long

Description

Member of TextRange

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

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.