Table of contents
TOC
Collapse the table of content
Expand the table of content

Table Object (Publisher)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents a single table.

Example

Use the Table property to return a Table object. The following example selects the specified table in the active publication.

Sub SelectTable() 
 With ActiveDocument.Pages(1).Shapes(1) 
 If .Type = pbTable Then _ 
 .Table.Cells.Select 
 End With 
End Sub

Use the AddTable method to add a Shape object representing a table at the specified range. The following example adds a 5x5 table on the first page of the active publication, and then selects the first column of the new table.

Sub NewTable() 
 With ActiveDocument.Pages(1).Shapes.AddTable(NumRows:=5, NumColumns:=5, _ 
 Left:=72, Top:=300, Width:=400, Height:=100) 
 .Table.Columns(1).Cells.Select 
 End With 
End Sub

Methods

Name
ApplyAutoFormat

Properties

Name
Application
Cells
Columns
GrowToFitText
Parent
Rows
TableDirection
© 2017 Microsoft