ShapeByID Method

Searches for a shape with the specified ID (ID property) in the shape collection of the group/page. Returns an instance of the Shape object that corresponds to the found shape.

Applies to: Page object, Shape object

Syntax

[[Set] shapeRet =] object.ShapeByID ( shapeID )

The ShapeByID method syntax has these parts:

Part Description
object

Required. An expression that returns an instance of an object from the Applies to list.

shapeID Required. An expression that returns a Long value. The ID of the shape to be found.
shapeRet Optional. A Shape type variable.

Remarks

If there is no shape with the shapeID ID in the collection, the ShapeByID method returns Nothing.

 

See Also

ID property, RemoveAllShapes method, RemoveShape method, RemoveShapeByID method, ReorderShape method, ReorderShapeByID method, Shape method, ShapesNum method