Syntax
TableInsertTable [.ConvertFrom = number] [, .NumColumns = number] [, .NumRows = number] [, .InitialColWidth = number or text] [, .Wizard] [, .Format = number] [, .Apply = number]
Remarks
Converts a series of selected paragraphs into a table or inserts an empty table if there is no selection. If the insertion point is already in a table, an error occurs.
Argument | Explanation | |
.ConvertFrom | Specifies the character used to separate items of text into cell contents: 0 (zero) Paragraph marks (Word places every other paragraph in the second column) 1 Tab characters 2 Commas | |
.NumColumns | Number of columns in the table. |
Argument | Explanation | |
.NumRows | Number of rows in the table. | |
.InitialColWidth | The initial width for each column, in points or a text measurement. If omitted, column width is calculated so that the table stretches from margin to margin. | |
.Wizard | Runs the Table wizard. | |
.Format | One of the predefined formats listed in the Table AutoFormat dialog box (Table menu): 0 (zero) corresponds to the first format listed in the Formats box ("none"), 1 corresponds to the second format, and so on. | |
.Apply | Specifies which attributes of the format specified by .Format to apply to the table. Use the sum of any combination of the following values: 0 None 1 Borders 2 Shading 4 Font 8 Color 16 AutoFit 32 Heading Rows 64 Last Row 128 First Column 256 Last Column |
Example
This example inserts a three-column, five-row table:
TableInsertTable .NumColumns = 3, .NumRows = 5, \ .InitialColWidth = "2 in"
See Also
TableAutoFormat, TableToText, TextToTable