

The following example sets the fill pattern for shapes one and three in the active presentation. Use Shapes.Range ( index), where index is the shape's name or index number or an array of shape names or index numbers, to return a ShapeRange collection that represents a subset of the Shapes collection. PresetGradient Style:=msoGradientHorizontal, Variant:=1, _

The following example sets the fill to a preset shade for shape one in the active presentation.

Use Shapes ( index), where index is the shape's name or index number, to return a single Shape object. ActivePresentation.Slides(1).Shapes.AddShape Type:=msoShapeRectangle, _ The following example adds a rectangle to the active presentation. Use the BuildFreeformmethod in conjunction with the ConvertToShapemethod to create a new freeform and add it to the collection. Use the AddCallout, AddComment, AddConnector, AddCurve, AddLabel, AddLine, AddMediaObject, AddOLEObject, AddPicture, AddPlaceholder, AddPolyline, AddShape, AddTable, AddTextbox, AddTextEffect, or AddTitlemethod to create a new shape and add it to the Shapes collection. If you want to do something (like delete or set a property) to all the shapes on a document at the same time, use the Rangemethod with no argument to create a ShapeRange object that contains all the shapes in the Shapes collection, and then apply the appropriate property or method to the ShapeRange object.
