Compartilhar via


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

  • 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.

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.PowerPoint Namespace