Delete Method

       

Delete method as it applies to the ShapeNodes object.

Deletes the specified shape node object.

expression.Delete(Index)

expression   Required. An expression that returns a ShapeNodes collection.

Index  Required Long. The number of the shape node to delete.

Delete method as it applies to the WebHiddenFields and WebListBoxItems objects.

Deletes the specified hidden Web field or Web list box item object.

expression.Delete(Index)

expression   Required. An expression that returns one of the above objects.

Index  Required Long. The number of the Web field or list box item to delete.

Delete method as it applies to all the other objects in the Applies To list.

Deletes the specified object.

expression.Delete

expression   Required. An expression that returns one of the other objects in the Applies To list.

Example

As it applies to the ShapeNodes object.

This example deletes the first node in the first shape in the active publication.

Sub DeleteNode()
    ActiveDocument.Pages(1).Shapes(1).Nodes.Delete Index:=1
End Sub

As it applies to the Shapes object.

This example deletes the first shape in the active publication.

Sub DeleteShape()
    ActiveDocument.Pages(1).Shapes(1).Delete
End Sub