Shapes.AddPlaceholder Method
Restores a previously deleted placeholder on a slide. Returns a Shape object that represents the restored placeholder.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function AddPlaceholder ( _
Type As PpPlaceholderType, _
Left As Single, _
Top As Single, _
Width As Single, _
Height As Single _
) As Shape
'Usage
Dim instance As Shapes
Dim Type As PpPlaceholderType
Dim Left As Single
Dim Top As Single
Dim Width As Single
Dim Height As Single
Dim returnValue As Shape
returnValue = instance.AddPlaceholder(Type, _
Left, Top, Width, Height)
Shape AddPlaceholder(
PpPlaceholderType Type,
float Left,
float Top,
float Width,
float Height
)
Parameters
- Type
Type: Microsoft.Office.Interop.PowerPoint.PpPlaceholderType
The type of placeholder. Placeholders of type ppPlaceholderVerticalBodyor ppPlaceholderVerticalTitleare 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.
- Left
Type: System.Single
The position (in points) of the upper-left corner of the placeholder relative to the upper-left corner of the document.
- Top
Type: System.Single
The position (in points) of the upper-left corner of the placeholder relative to the upper-left corner of the document.
- Width
Type: System.Single
The width of the placeholder, in points.
- Height
Type: System.Single
The height of the placeholder, in points.
Return Value
Type: Microsoft.Office.Interop.PowerPoint.Shape
Remarks
If more than one placeholder of a specified type is 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.