Class ShapeRange (PowerPoint VBA)
The class ShapeRange represents a shape range, which is a set of shapes on a document. A shape range can contain as few as a single shape or as many as all the shapes on the document.
The classes CustomLayout, Master, Selection, Shape and Slide. give access to class ShapeRange
Dim sre as ShapeRange
Set sre = ActiveWindow.RangeFromPoint.Ungroup()
Methods
Align - Aligns the shapes in the specified range of shapes.
Apply - expression.Apply
ApplyAnimation - Applies animation to a ShapeRange object.
ConvertTextToSmartArt - Returns the number of objects in the specified collection.
Copy - Copies the specified object to the Clipboard.
Cut - Deletes the specified object and places it on the Clipboard.
Delete - Deletes the specified ShapeRange object.
Distribute - Evenly distributes the shapes in the specified range of shapes. You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire slide or just over the space they originally occupy.
Duplicate - Creates a duplicate of the specified ShapeRange object, adds the range of shapes to the Shapes collection, and then returns the new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.
Flip - Flips the specified shape range around its horizontal or vertical axis.
Group - Groups the shapes in the specified range. Returns the grouped shapes as a single Shape object.
IncrementLeft - Moves the specified shape range horizontally by the specified number of points.
IncrementRotation - Changes the rotation of the specified shape range around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape range.
IncrementTop - Moves the specified shape range vertically by the specified number of points.
Item - Returns a single Shape object from the specified ShapeRange collection.
MergeShapes - Combines all of the shapes in the range to create a single new shape.
PickUp - Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
PickupAnimation - Picks up all animation from the ShapeRange object.
Regroup - Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.
RerouteConnections - Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
ScaleHeight - Scales the height of the shapes in the range by a specified factor.
ScaleWidth - Scales the width of the shapes in the range by a specified factor.
Select - Selects the specified object.
SetShapesDefaultProperties - Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Ungroup - Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
UpgradeMedia - Upgrades media within the specified ShapeRange object.
ZOrder - Moves the specified shape range in front of or behind other shapes in the collection (that is, changes the shape range's position in the z-order).
Properties
ActionSettings returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show.
Adjustments returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any ShapeRange object that represents an AutoShape, WordArt, or a connector.
AlternativeText returns or sets the alternative text associated with a shape in a Web presentation.
AnimationSettings returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape.
AutoShapeType returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line, freeform drawing, or connector.
BackgroundStyle sets or returns the background style of the specified object.
BlackWhiteMode returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode.
Callout returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts.
Chart returns the Chart object of the current ShapeRange object.
Child msoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent.
ConnectionSiteCount returns the number of connection sites on the specified shape.
Connector determines whether the specified shape is a connector.
ConnectorFormat returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors.
Count returns the number of objects in the specified collection.
CustomerData returns a CustomerData object.
Decorative sets or returns the decorative flag for the specified object.
Fill returns a FillFormat object that contains fill formatting properties for the specified shape.
Glow returns the glow format for the specified range of shapes.
GraphicStyle returns or sets an MsoGraphicStyleIndex constant that represents the style of a shape range containing one or more SVG graphics.
GroupItems returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group.
HasChart returns whether the shape range represented by the specified object contains a chart.
HasInkXML returns an MsoTriState enumeration value that indicates whether the specified shape range contains ink XML that can be retrieved via the ShapeRange.InkXML property.
HasSectionZoom
HasSmartArt returns True if the current ShapeRange object has a SmartArt diagram.
HasTable returns whether the specified shape is a table.
HasTextFrame returns whether the specified shape has a text frame.
Height returns or sets the height of the specified object, in points.
HorizontalFlip returns whether the specified shape is flipped around the horizontal axis.
Id returns a Long that identifies the shape or range of shapes.
InkXML returns a String that contains the InkActionML associated with the specified shape range.
IsNarration specifies whether the specified shape range contains a narration.
Left returns or sets a Single that represents the distance in points from the left edge of the leftmost shape in the shape range to the left edge of the slide.
Line returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.
LinkFormat returns a LinkFormat object that contains the properties that are unique to linked OLE objects.
LockAspectRatio determines whether the specified shape retains its original proportions when you resize it.
MediaFormat returns the current MediaFormat object.
MediaType returns the OLE media type.
Model3D returns a Model3DFormat object that represents the 3D properties of a 3D model object.
Name when a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape.
Nodes returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to ShapeRange objects that represent freeform drawings.
OLEFormat returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects.
ParentGroup returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
PictureFormat returns a PictureFormat object that contains picture formatting properties for the specified shape.
PlaceholderFormat returns a PlaceholderFormat object that contains the properties that are unique to placeholders.
Reflection returns the reflection format for the specified range of shapes.
Rotation returns or sets the number of degrees the specified shape is rotated around the z-axis.
Shadow returns a ShadowFormat object that contains shadow formatting properties for the specified shapes.
ShapeStyle sets or returns the shape style index for the specified object.
SmartArt returns the SmartArt diagram of the ShapeRange object.
SoftEdge returns the soft edge format for the specified range of shapes.
Table returns a Table object that represents a table in a shape or in a shape range.
Tags returns a Tags object that represents the tags for the specified object.
TextEffect returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.
TextFrame returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.
TextFrame2 returns the TextFrame2 object associated with the specified ShapeRange object that contains the alignment and anchoring properties for the specified shape range.
ThreeD returns a ThreeDFormat object that contains 3D - effect formatting properties for the specified shape.
Title returns a Shape object that represents the slide title.
Top returns or sets a Single that represents the distance from the top edge of the topmost shape in the shape range to the top edge of the document.
Type represents the type of shape or shapes in a range of shapes.
VerticalFlip determines whether the specified shape is flipped around the vertical axis.
Vertices returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs.
Visible returns or sets the visibility of the specified object or the formatting applied to the specified object.
Width returns or sets the width of the specified object, in points.
ZOrderPosition returns the position of the specified shape in the z-order.