API Documentation > CorelDRAW > 2025-v26 > TextWords > IVGTextWords
TextWords.Count property
Gets the number of items in the collection
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of words in a collection.
Examples:
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