Table Object

Multiple objects

Represents a single table. The Table object is a member of the Tables collection. The Tables collection includes all the tables in the specified selection, range, or document.

Using the Table Object

Use Tables(index), where index is the index number, to return a single Table object. The index number represents the position of the table in the selection, range, or document. The following example converts the first table in the active document to text.

ActiveDocument.Tables(1).ConvertToText Separator:=wdSeparateByTabs

Use the Add method to add a table at the specified range. The following example adds a 3x4 table at the beginning of the active document.

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.Tables.Add Range:=myRange, NumRows:=3, NumColumns:=4

Properties | AllowAutoFit Property | AllowPageBreaks Property | Application Property | ApplyStyleFirstColumn Property | ApplyStyleHeadingRows Property | ApplyStyleLastColumn Property | ApplyStyleLastRow Property | AutoFormatType Property | Borders Property | BottomPadding Property | Columns Property | Creator Property | ID Property | LeftPadding Property | NestingLevel Property | Parent Property | PreferredWidth Property | PreferredWidthType Property | Range Property | RightPadding Property | Rows Property | Shading Property | Spacing Property | Style Property | TableDirection Property | Tables Property | TopPadding Property | Uniform Property

Methods | AutoFitBehavior Method | AutoFormat Method | Cell Method | ConvertToText Method | Delete Method | Select Method | Sort Method | SortAscending Method | SortDescending Method | Split Method | UpdateAutoFormat Method

Parent Objects

Child Objects | Borders Object | Columns Object | Range Object | Rows Object | Shading Object | Tables Object

See Also | Cell Method | Error Accessing a Table Row or Column | Working with Tables