Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.34 KB

Publisher.Shape.Table.md

File metadata and controls

55 lines (40 loc) · 1.34 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shape.Table property (Publisher)
vbapb10.chm2228328
vbapb10.chm2228328
Publisher.Shape.Table
a9b29d1f-2459-556c-56f8-f8f809b879c9
06/13/2019
medium

Shape.Table property (Publisher)

Returns a Table object that represents a table in Microsoft Publisher.

Syntax

expression.Table

expression A variable that represents a Shape object.

Example

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(3).Cells(3).Fill.ForeColor.RGB = RGB _ 
 (Red:=255, Green:=0, Blue:=0) 
 End With 
End Sub

The following example selects the specified table in the active publication. This example assumes that there is at least one shape on the first page of the active publication.

Sub SelectTable() 
 With ActiveDocument.Pages(1).Shapes(1) 
 If .Type = pbTable Then 
 .Table.Rows(3).Cells(3).Fill.ForeColor _ 
 .RGB = RGB(Red:=150, Green:=150, Blue:=150) 
 End If 
 End With 
End Sub

[!includeSupport and feedback]