Previous Document Next Document

Object Model Reference : Classes : T : TextColumns : Properties : TextColumns.All


TextColumns.All

Property All As TextRange

Description

Member of TextColumns

The All property returns a text range (or TextRange object) containing all the columns in a collection.

The All property returns a read-only value.

VBA example

The following VBA example links frames of paragraph text. It then creates three columns in the first frame, applying bold formatting to all text in the 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 text must be long enough to span " & _
  "across multiple columns in this frame. By adding this sentence, " & _
  "this text is now long enough."
 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 columns
 t.Frame.SetColumns 3, False, Array(0.7, 0.1, 1, 0.1, 1)
 t.Frame.Range.Columns.All.Bold = True
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.