Restores a previously deleted placeholder on a slide. Returns a Shape object that represents the restored placeholder.
Note If you haven't previously deleted the specified placeholder, this method causes an error.
expression.AddPlaceholder(Type, Left, Top, Width, Height)
expression Required. An expression that returns a Shapes object.
Type Required PpPlaceholderType. The type of placeholder. Placeholders of type ppPlaceholderVerticalBody or ppPlaceholderVerticalTitle are found only on slides of layout type ppLayoutVerticalText, ppLayoutClipArtAndVerticalText, ppLayoutVerticalTitleAndText, or ppLayoutVerticalTitleAndTextOverChart. You cannot create slides with any of these layouts from the user interface; you must create them programmatically by using the Add method or by setting the Layout property of an existing slide.
PpPlaceholderType can be one of these PpPlaceholderType constants. |
ppPlaceholderBitmap |
ppPlaceholderBody |
ppPlaceholderCenterTitle |
ppPlaceholderChart |
ppPlaceholderDate |
ppPlaceholderFooter |
ppPlaceholderHeader |
ppPlaceholderMediaClip |
ppPlaceholderMixed |
ppPlaceholderObject |
ppPlaceholderOrgChart |
ppPlaceholderSlideNumber |
ppPlaceholderSubtitle |
ppPlaceholderTable |
ppPlaceholderTitle |
ppPlaceholderVerticalBody |
ppPlaceholderVerticalTitle |
Left , Top Optional Single. The position (in points) of the upper-left corner of the placeholder relative to the upper-left corner of the document.
Width , Height Optional Single. The width and height of the placeholder, in points.
Remarks
If more than one placeholder of a specified type has been deleted from the slide, the AddPlaceholder method will add them back to the slide, one by one, starting with the placeholder that has the lowest original index number.
Example
Suppose that slide two in the active presentation originally had a title at the top of the slide that's been deleted, either manually or with the following line of code.
ActivePresentation.Slides(2).Shapes.Placeholders(1).Delete
This example restores the deleted placeholder to slide two.
Application.ActivePresentation.Slides(2) _
.Shapes.AddPlaceholder ppPlaceholderTitle