f$Word: InsertTable
f$Word: InsertTable
Insert a table into the active document. The number of columns and the distance of the table to the left margin are specified. The width of the columns can be set using the function f$Word: TableColumn.
After inserting the table, the cursor is set to the first column of the first table row so that the table is filled upon the next inserting operation of a text or an RTF-text. The next text component is always attached below the table.
The new table initially only has 1 row. Moving to the next table column is achieved by the command f$Word(’Move cursor’,’12’,’1’). If the final column is reached a new row is created - exactly the same as for the manual insertion.
Syntax: | Status = f$Word('InsertTable','Number','Space') | ||
| Argument | Type | Meaning |
| InsertTable | String | Keyword |
| Number | String | Number of table columns |
| Distance | String | Distance of the table to the left margin (in cm; exact to max. 0,01cm) |
Result: | Integer | 0: Command successfully executed -1: No active document | |
Example: | Insert an RTF-text with a defined margin format. Therefore, a table with a row and a column is inserted which the RTF-text will be inserted in. The edge distance is defined by the distance of the table to the left margin and the width of the table column: Status = f$Word('InsertTable' ,'1',' 2.0' ) | ||