Syntax
FormatColumns [.Columns = number or text] [, .ColumnNo = text] [, .ColumnWidth = text] [, .ColumnSpacing = text] [, .EvenlySpaced = number] [, .ApplyColsTo = number] [, .ColLine = number] [, .StartNewCol = number]
Remarks
Formats all or part of the document with the specified number of columns, or changes the width of and space between existing columns. The arguments for the FormatColumns statement correspond to the options in the Columns dialog box (Format menu).
Argument | Explanation | |
.Columns | The number of columns to apply to the portion of the document specified by .ApplyColsTo | |
.ColumnNo | If .EvenlySpaced is set to 0 (zero), the number of the column to format; if you are returning information from a FormatColumns dialog record, the column for which you want to return the width To set the width of any column independently of other columns, you need to include an additional FormatColumns instruction to set the width of the last column. If you include only one FormatColumns instruction, the resulting number of columns will be the same as .ColumnNo. For example, if you change the width of the first column in a section containing three columns, there will be only one column after the instruction runs. To preserve the three-column format, you need to include an additional FormatColumns instruction and set .ColumnNo to 3. |
Argument | Explanation | |
.ColumnWidth | The width of the column specified by .ColumnNo, or if .EvenlySpaced is set to 1, the width of each column in the portion of the document specified by .ApplyColsTo | |
.ColumnSpacing | The space between columns | |
.EvenlySpaced | If 1, makes each column the same width | |
.ApplyColsTo | Specifies the portion of the document to apply the column format to: 0 (zero) This section 1 This Point Forward 2 Selected Sections 3 Selected Text 4 Whole Document | |
.ColLine | If 1, adds a line between columns | |
.StartNewCol | If 1, corresponds to selecting the Start New Column check box (effective only if This Point Forward is specified by .ApplyColsTo) |
Example
This example formats the current section into three columns of equal width and specifies that a vertical line appear between columns:
FormatColumns .Columns = "3", .EvenlySpaced = 1, .ColLine = 1
See Also
TableColumnWidth