RemoveShapeByID Method

Removes a shape with the specified ID (the ID property) from the shape collection of the group/page, and returns the number of remaining shapes.

Applies to: Page object, Shape object

Syntax

[[Let] countRet =] object.RemoveShapeByID ( shapeID )

The RemoveShapeByID method syntax has these parts:

Part Description
object Required. An expression that returns an object in the Applies to list.
shapeID Required. An expression that returns a Long value. The ID (ID property) of the shape to be deleted.
countRet Optional. A Long type variable

Remarks

If there is no shape with the specified shapeID in the shape collection of the group/page, the RemoveShapeByID method doesn't delete anything and returns the current number of shapes in the group/page.

 

See Also

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