Previous Document Next Document
TextRange.Columns

Property Columns As TextColumns

Member of TextRange

The Columns property returns a collection of all of the text columns in the range.

The Columns property returns a read-only value.

The following code example links frames of paragraph text. In the first frame, three columns are created, and the second column is filled with red.

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 is a test. This is a test. " & _ 
  "This is a test. This is a test. This is a test." 
 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) 
 t.Story.Columns.Item(2).Fill.UniformColor.RGBAssign 155, 0, 0 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.