TableBackground Object (PowerPoint)

Represents the background associated with a Table object.

Use the Background property of a Table object to return the TableBackground object associated with the table.

To get a Table object from an existing shape, use the Table property of the Shape or ShapeRange object that contains the table. You can create a shape that contains a table by using the AddTable method of the Shapes collection.

The properties of the TableBackground object return objects that represent various aspects of the formatting associated with a table.

The following example shows how to get a TableBackground object and set two of its properties.

Public Sub TableBackground_Example() 
    Dim pptShape As PowerPoint.Shape 
    Dim pptTable As PowerPoint.Table 
    Dim pptTableBackground As PowerPoint.TableBackground 
    Dim pptFillFormat As PowerPoint.FillFormat 
    Set pptShape = ActivePresentation.Slides(2).Shapes.AddTable(3, 3) 
    Set pptTable = pptShape.Table 
    Set pptTableBackground = pptTable.Background 
    Set pptFillFormat = pptTableBackground.Fill 
    ' Add a patterned fill to the table background 
    pptFillFormat.Patterned (msoPatternSmallGrid) 
    ' Add a shadow to the table background 
    pptTableBackground.Shadow.Visible = msoTrue 
End Sub


Other resources

Microsoft PowerPoint Object Model Overview
© 2015 Microsoft