Skip to content

Latest commit

 

History

History
67 lines (37 loc) · 1.5 KB

PowerPoint.Shape.SetShapesDefaultProperties.md

File metadata and controls

67 lines (37 loc) · 1.5 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shape.SetShapesDefaultProperties method (PowerPoint)
vbapp10.chm547012
vbapp10.chm547012
PowerPoint.Shape.SetShapesDefaultProperties
4974cc1b-28af-94da-0821-76ffb698e2c3
06/08/2017
medium

Shape.SetShapesDefaultProperties method (PowerPoint)

Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.

Syntax

expression.SetShapesDefaultProperties

expression A variable that represents a Shape object.

Example

This example adds a rectangle to myDocument, formats the rectangle's fill, applies the rectangle's formatting to the default shape, and then adds another smaller rectangle to the document. The second rectangle has the same fill as the first one.

Set mydocument = ActivePresentation.Slides(1)

With mydocument.Shapes

    With .AddShape(msoShapeRectangle, 5, 5, 80, 60)

        With .Fill

            .ForeColor.RGB = RGB(0, 0, 255)

            .BackColor.RGB = RGB(0, 204, 255)

            .Patterned msoPatternHorizontalBrick

        End With

    ' Sets formatting for default shapes

        .SetShapesDefaultProperties

    End With

' New shape has default formatting

    .AddShape msoShapeRectangle, 90, 90, 40, 30

End With

See also

Shape Object

[!includeSupport and feedback]