title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Shapes.Item method (Project) |
project-server |
43fba4f4-f3d3-20a0-2c77-15e31dcdcbf5 |
06/08/2017 |
medium |
Returns an individual Shape object in the Shapes collection.
expression.Item (Index)
expression A variable that represents a Shapes object.
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 |
Shape
The shape that is specified by the Index parameter.
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
[!includeSupport and feedback]