Share via


TextColumn Object

Word Developer Reference

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.

Remarks

Use TextColumns(Index), where Index is the index number, to return a single TextColumn object. The index number represents the position of the column in the TextColumns collection (counting from left to right).

The following example sets the space after the first text column in the active document to 0.5 inch.

Visual Basic for Applications
  ActiveDocument.PageSetup.TextColumns(1).SpaceAfter = _
    InchesToPoints(0.5)

Use the Add method to add a column to the collection of columns. By default, there is one text column in the TextColumns collection. The following example adds a 2.5-inch-widecolumn to the active document.

Visual Basic for Applications
  ActiveDocument.PageSetup.TextColumns.Add _
    Width:=InchesToPoints(2.5), _
    Spacing:=InchesToPoints(0.5), EvenlySpaced:=False

Use the SetCount method to arrange text into columns. The following example arranges the text in the active document into three columns.

Visual Basic for Applications
  ActiveDocument.PageSetup.TextColumns.SetCount NumColumns:=3

See Also