API Documentation > CorelDRAW > 2025-v26 > TextFrames > IVGTextFrames
TextFrames.Count property
Gets the number of items in the collection
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of text frames in a TextFrames collection.
Examples:
The following VBA example links frames of paragraph text and displays the number of frames in the collection.
Sub Test()
Dim d As Document
Dim s As Shape
Dim s1 As Shape
Dim s2 As Shape
Dim t As Text
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 5, 5, String$(750, "Z"))
Set s1 = d.ActiveLayer.CreateParagraphText(5, 5, 8, 8)
Set s2 = d.ActiveLayer.CreateParagraphText(8, 8, 10, 10)
Set t = s.Text
' Link the frames together.
t.Frame.LinkTo s1
s1.Text.Frame.LinkTo s2
MsgBox "The number of frames in the collection is " & t.Frames.Count 
End Sub