Share via


CanvasShapes.Item Property

Returns a single Shape object from the specified Shapes collection.

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

Syntax

'Declaration
ReadOnly Default Property Item ( _
    Index As Object _
) As Shape
    Get
'Usage
Dim instance As CanvasShapes
Dim Index As Object
Dim value As Shape

value = instance(Index)
Shape this[
    Object Index
] { get; }

Parameters

  • Index
    Type: System.Object
    The name or index number of the single Shape object in the collection to be returned.

Property Value

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

Examples

This example sets the foreground color to red for the shape named "Rectangle 1" on slide one in the active presentation.

ActivePresentation.Slides.Item(1).Shapes.Item("rectangle 1").Fill _

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

See Also

Reference

CanvasShapes Interface

CanvasShapes Members

Microsoft.Office.Interop.PowerPoint Namespace