Previous Document Next Document

Object Model Reference : Classes : T : TextWords : Properties : TextWords.Count


TextWords.Count

Property Count As Long

Description

Member of TextWords

The Count property returns the number of words in a collection.

The Count property returns a read-only value.

VBA example

The following VBA example creates paragraph text and displays the number of words it contains.

Sub Test()
 Dim t As Text
 Dim s As Shape
 Dim d As Document
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphText(2, 2, 8, 8, _
  "This is an example for the TextWords Class")
 Set t = s.Text
 MsgBox "The total number of words is " & t.Story.Words.Count
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.