TableBackground object (PowerPoint)

Represents the background associated with a Table object.

Remarks

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.

Example

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

See also

PowerPoint Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.