Shapes.Item method (Project)
Returns an individual Shape object in the Shapes collection.
Syntax
expression.Item (Index)
expression A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | Variant | Can be a String value for the name of the shape or a Long value for the ordinal index number of the shape. |
Index | Required | Variant |
Return value
Shape
The shape that is specified by the Index parameter.
Remarks
The Item method acts like the default Shapes.Value property. For example, create a report namedTable Tests that contains a table. The following statement in the Immediate window of the VBE prints the name of the table.
? ActiveProject.Reports("Table Tests").Shapes.Item(1).Name
If you leave off the Item method, the following statement has the same output, but uses the default Value property to get the Shape object.
? ActiveProject.Reports("Table Tests").Shapes(1).Name
The following statement is the same as the previous:
? ActiveProject.Reports("Table Tests").Shapes.Value(1).Name
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.