Delete Method

Applies To

ColorScheme object, Master object, NamedSlideShow object, PrintRange object, Selection object, Shape object, ShapeNodes collection object, ShapeRange collection object, Slide object, SlideRange collection object, Tags object, TextRange object.

Description

Syntax 1: Deletes the specified object.

Syntax 2: Deletes the specified node.

Syntax 3: Deletes the specified tag.

Syntax 1

expression.Delete

Syntax 2

expression.Delete(Index)

Syntax 3

expression.Delete(Name)

expression Syntax 1: An expression that returns the object to be deleted.
Syntax 2: An expression that returns a ShapeNodes object.
Syntax 3: An expression that returns a Tags object.

Index Required Integer. Specifies the node to be deleted. The segment following that node will also be deleted. If the node is a control point of a curve, the curve and all of its nodes will be deleted.

Name Required String. Specifies the name of the tag to be deleted.

See Also

Clear method, ClearAll method, Cut method, DeleteText method.

Example

This example deletes all free-form shapes from slide one in the active presentation.

With Application.ActivePresentation.Slides(1).Shapes
    For s = .Count To 1 Step -1
        With .Item(s)
            If .Type = msoFreeform Then .Delete
        End With
    Next
End With