Share via


Placeholders.FindByName Method

Finds the placeholder in the Placeholders collection at the specified index location or with the specified name.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function FindByName ( _
    Index As Object _
) As Shape
'Usage
Dim instance As Placeholders
Dim Index As Object
Dim returnValue As Shape

returnValue = instance.FindByName(Index)
Shape FindByName(
    Object Index
)

Parameters

  • Index
    Type: System.Object
    The index of the placeholder to be found.

Return Value

Type: Microsoft.Office.Interop.PowerPoint.Shape
Shape

Remarks

Because it takes a Variant, the FindByName method makes it possible to locate a member of the Placeholders collection by specifying either the index number (an Integer or Long) or the name (a String) of an individual placeholder. Unlike the corresponding methods of other collections, such as CanvasShapes or NamedSlideShow, the Item[Int32] method of the Placeholders collection takes only a Long.

Examples

The following example shows how to use the FindByName method to select the title placeholder in slide one in the active presentation.

Public Sub FindByName_Example()

    

    PowerPoint.ActivePresentation.Slides(1).Shapes.Placeholders.FindByName("Title 1").Select



End Sub

See Also

Reference

Placeholders Interface

Placeholders Members

Microsoft.Office.Interop.PowerPoint Namespace