API Documentation > CorelDRAW > 2025-v26 > TextColumns > IVGTextColumns
TextColumns.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 columns in a collection.
Examples:
The following VBA example links frames of paragraph text. In the first frame, it then creates three columns displays the number of columns.
Sub Test()
Dim s As Shape
Dim s1 As Shape
Dim s2 As Shape
Dim d As Document
Dim t As Text
Dim strText As String
strText = "This is a test. This sentence must be long enough " & _
  "to span across multiple columns in this frame. I am sure " & _
  "that it will cross multiple columns now."
strText = strText & " This is the next sentence. " & strText
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 5, 5, strText)
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
' Set the columns
t.Frame.SetColumns 3, False, Array(0.7, 0.1, 1, 0.1, 1)
MsgBox "The column count for the frame is " & t.Frame.Range.Columns.Count 
End Sub