Class TextColumn (Word VBA)

The class TextColumn represents a single text column. The TextColumn object is a member of the TextColumns collection. The TextColumns collection includes all the columns in a document or section of a document.

The main procedure of class TextColumn is TextColumns.Add

Set

To use a TextColumn class variable it first needs to be instantiated, for example

Dim tcn as TextColumn
Set tcn = ActiveDocument.PageSetup.TextColumns(Index:=1)

The following procedures can be used to set variables of type TextColumn: TextColumns.Add, TextColumns.Item and PageSetup.TextColumns

For Each

Here is an example of processing the TextColumn items in a collection.

Dim tcn As TextColumn
For Each tcn In ActiveDocument.PageSetup.TextColumns
	
Next tcn

Methods

This is the main method of the TextColumn class

TextColumns.Add - Returns a TextColumn object that represents a new text column added to a section or document.

Dim tcn As TextColumn
Set tcn = ActiveDocument.PageSetup.TextColumns.Add()

Properties

Parent returns an object that represents the parent object of the specified TextColumn object.

Dim objParent As Object
Set objParent = ActiveDocument.PageSetup.TextColumns(1).Parent

SpaceAfter returns or sets the amount of spacing (in points) after the specified paragraph or text column.

ActiveDocument.PageSetup.TextColumns(1).SpaceAfter =

Width returns or sets the width, in points, of the specified text columns.

ActiveDocument.PageSetup.TextColumns(1).Width =

TextColumns.Count returns a Long that represents the number of text columns in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.PageSetup.TextColumns.Count

TextColumns.EvenlySpaced true if text columns are evenly spaced.

ActiveDocument.PageSetup.TextColumns.EvenlySpaced =

TextColumns.FlowDirection returns or sets the direction in which text flows from one text column to the next.

ActiveDocument.PageSetup.TextColumns.FlowDirection = wdFlowLtr

TextColumns.LineBetween true if vertical lines appear between all the columns in the TextColumns collection.

ActiveDocument.PageSetup.TextColumns.LineBetween =

TextColumns.Parent returns an object that represents the parent object of the specified TextColumns object.

Dim objParent As Object
Set objParent = ActiveDocument.PageSetup.TextColumns.Parent

TextColumns.Spacing returns or sets the spacing (in points) between columns.

ActiveDocument.PageSetup.TextColumns.Spacing =

TextColumns.Width returns or sets the width of the Word art text effects, in points.

ActiveDocument.PageSetup.TextColumns.Width =