Class ShapeRange (Word 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 one shape or as many as all the shapes in the document.

The classes Range, Selection and Shape. give access to class ShapeRange

Methods

Align - Aligns the shapes in the specified range of shapes.

Apply - expression.Apply

CanvasCropBottom - Crops a percentage of the height of a drawing canvas from the bottom of the canvas.

CanvasCropLeft - Crops a percentage of the width of a drawing canvas from the left side of the canvas.

CanvasCropRight - Crops a percentage of the width of a drawing canvas from the right side of the canvas.

CanvasCropTop - Crops a percentage of the height of a drawing canvas from the top of the canvas.

ConvertToInlineShape - Converts the specified shape in the drawing layer of a document to an inline shape in the text layer. You can convert only shapes that represent pictures, OLE objects, or ActiveX controls.

Delete - Deletes the specified range of shapes.

Distribute - Evenly distributes the shapes in the specified range of shapes.

Duplicate - Creates a duplicate of the specified ShapeRange object, adds the new range of shapes to the Shapes collection at a standard offset from the original shapes, and then returns a Shape object.

Flip - Flips a shape horizontally or vertically.

Group - Groups the shapes in the specified range, and returns the grouped shapes as a single Shape object.

IncrementLeft - Moves the specified shape horizontally by the specified number of points.

IncrementRotation - Changes the rotation of the specified shape around the z-axis by the specified number of degrees.

IncrementTop - Moves the specified shape vertically by the specified number of points.

Item - Returns an individual Shape object in a collection.

PickUp - Copies the formatting of the specified shape.

ScaleHeight - Scales the height of a range of shapes by a specified factor.

ScaleWidth - Scales the width of a shape by a specified factor.

Select - Selects the specified range of shapes.

SetShapesDefaultProperties - Applies the formatting of a default shape for a document to the specified range of shapes.

Ungroup - Ungroups any grouped shapes in the specified range of shapes, disassembles pictures and OLE objects within the specified shape or range of shapes, and returns the ungrouped shapes as a single 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

Adjustments returns an Adjustments object that contains adjustment values for all the adjustments in the specified ShapeRange object that represents an AutoShape or WordArt.

AlternativeText returns or sets the alternative text associated with a shape in a webpage.

Anchor returns a Range object that represents the anchoring range for the specified shape range.

AutoShapeType returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line or freeform drawing.

BackgroundStyle sets or returns the background style of the shapes in the specified shape range.

Callout returns a CalloutFormat object that contains callout formatting properties for the specified shape.

CanvasItems returns a CanvasShapes object that represents a collection of shapes in a drawing canvas.

Child true if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent.

Count returns a Long that represents the number of shapes in the collection.

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 a GlowFormat object that represents the glow formatting for a 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.

Height returns or sets the height of the specified shape range.

HeightRelative returns or sets a Single that represents the percentage of the target shape to which the range of shapes is sized.

HorizontalFlip indicates that a range of shapes has been flipped horizontally.

Hyperlink returns a Hyperlink object that represents the hyperlink associated with the specified ShapeRange object.

ID returns the identification type for the range of shapes.

LayoutInCell returns a Long that represents whether a shape in a table is displayed inside the table or outside the table.

Left returns or sets a Single that represents the horizontal position, measured in points, of the specified range of shapes. Can also be any valid WdShapePosition constant.

LeftRelative returns or sets a Single that represents the relative left position of a range of shapes.

Line returns a LineFormat object that contains line formatting properties for the specified range of shapes.

LockAnchor true if the anchor for the specified ShapeRange object is locked to the anchoring range.

LockAspectRatio msoTrue if the specified shape retains its original proportions when you resize it. MsoFalse if you can change the height and width of the shape independently of one another when you resize it.

Model3D returns a Model3DFormat object that contains Model3D properties.

Name returns or sets the name of the specified object.

Nodes returns a ShapeNodes collection that represents the geometric description of the specified shape.

ParentGroup returns a Shape object that represents the common parent shape of a range of shapes.

PictureFormat returns a PictureFormat object that contains picture formatting properties for the specified range of shapes.

Reflection returns a ReflectionFormat object that represents the reflection formatting for a range of shapes.

RelativeHorizontalPosition specifies the relative horizontal position of a range of shapes.

RelativeHorizontalSize returns or sets a WdRelativeHorizontalSize constant that represents the object to which a range of shapes is relative.

RelativeVerticalPosition specifies the relative vertical position of a range of shapes.

RelativeVerticalSize returns or sets a WdRelativeVerticalSize constant that represents the object to which a range of shapes is relative.

Rotation returns or sets the number of degrees the specified shape is rotated around the z-axis.

Shadow returns a ShadowFormat object that represents the shadow formatting for the specified shape.

ShapeStyle returns or sets the shape style for the shapes in the specified shape range.

SoftEdge returns a SoftEdgeFormat object that represents the soft edge formatting for a range of shapes.

TextEffect returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.

TextFrame returns a TextFrame object that contains the text for the specified range of shapes.

TextFrame2 returns a TextFrame2 object that contains the text for the specified range of shapes.

ThreeD returns a ThreeDFormat object that contains 3D formatting properties for the specified range of shapes.

Title returns or sets a String that contains a title for the shapes in the specified shape range.

Top returns or sets the vertical position of the specified shape or shape range in points.

TopRelative returns or sets a Single that represents the relative top position of a range of shapes.

Type returns the shape type.

VerticalFlip true if 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. You can use the array returned by this property as an argument for the AddCurve or AddPolyLine method.

Visible true if the specified object, or the formatting applied to it, is visible.

Width returns or sets the width, in points, of the shapes within the range.

WidthRelative returns or sets a Single that represents the relative width of a range of shapes.

WrapFormat returns a WrapFormat object that contains the properties for wrapping text around the specified range of shapes.

ZOrderPosition returns a Long that represents the position of the specified shape in the z-order.