ShapeRange ShapeRange ShapeRange Interface

Definition

Represents a shape range, which is a set of shapes on a document.

public interface class ShapeRange : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("0002443B-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface ShapeRange : System.Collections.IEnumerable
Public Interface ShapeRange
Implements IEnumerable
Attributes
Implements

Remarks

A shape range can contain as few as a single shape or as many as all the shapes on the document. You can include whichever shapes you want — chosen from among all the shapes on the document or all the shapes in the selection — to construct a shape range. For example, you could construct a ShapeRange collection that contains the first three shapes on a document, all the selected shapes on a document, or all the freeforms on a document.

Properties

Adjustments Adjustments 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. Read-only.

AlternativeText AlternativeText AlternativeText

Returns or sets the descriptive (alternative) text string for a ShapeRange object when the object is saved to a Web page. Read/write String.

Application Application Application

Returns an Application object that represents the Microsoft Excel application. Read-only.

AutoShapeType AutoShapeType 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. Read/write Microsoft.Office.Core.MsoAutoShapeType.

BackgroundStyle BackgroundStyle BackgroundStyle

Returns or sets the background style. Read/write.

BlackWhiteMode BlackWhiteMode BlackWhiteMode

Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write Microsoft.Office.Core.MsoBlackWhiteMode.

Callout Callout Callout

Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to ShapeRange objects that represent line callouts. Read-only.

CanvasItems CanvasItems CanvasItems

Reserved for internal use.

Chart Chart Chart

Returns an object that represents the chart contained in the shape range. Read-only.

Child Child Child

Returns msoTrue if the specified shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only Microsoft.Office.Core.MsoTriState.

ConnectionSiteCount ConnectionSiteCount ConnectionSiteCount

Returns the number of connection sites on the specified shape. Read-only Integer.

Connector Connector Connector

True if the specified shape is a connector. Read-only Microsoft.Office.Core.MsoTriState.

ConnectorFormat ConnectorFormat ConnectorFormat

Returns a ConnectorFormat object that contains connector formatting properties. Applies to ShapeRange objects that represent connectors. Read-only.

Count Count Count

Returns the number of objects in the collection. Read-only Integer.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which this object was created. If the object was created in Microsoft Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C. Read-only XlCreator.

Diagram Diagram Diagram

Returns a Diagram object representing a diagram.

DiagramNode DiagramNode DiagramNode

Returns a DiagramNode object that represents a node in a diagram.

Fill Fill Fill

Returns a FillFormat object that contains fill formatting properties for the specified chart or shape. Read-only.

Glow Glow Glow

Returns an object that contains glow formatting properties for the shape range. Read-only.

GroupItems GroupItems GroupItems

Returns a GroupShapes object that represents the individual shapes in the specified group. Applies to ShapeRange objects that represent grouped shapes. Read-only.

HasChart HasChart HasChart

Returns information on if a ShapeRange contains a chart. Read-only.

HasDiagram HasDiagram HasDiagram

Returns whether a shape or shape range contains a diagram. Read-only Microsoft.Office.Core.MsoTriState.

HasDiagramNode HasDiagramNode HasDiagramNode

Returns a value indicating whether a diagram node exists in a given shape or shape range. Read-only Microsoft.Office.Core.MsoTriState.

Height Height Height

The height of the object. Read/write Single.

HorizontalFlip HorizontalFlip HorizontalFlip

True if the specified shape is flipped around the horizontal axis. Read-only Microsoft.Office.Core.MsoTriState.

ID ID ID

Returns the type for the specified object. Read-only Integer.

Left Left Left

The distance from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart). Read/write Single.

Line Line Line

Returns a LineFormat object that contains line formatting properties for the specified shape. Read-only.

LockAspectRatio LockAspectRatio LockAspectRatio

True if the specified shape retains its original proportions when you resize it. False if you can change the height and width of the shape independently of one another when you resize it. Read/write Microsoft.Office.Core.MsoTriState.

Name Name Name

Returns or sets the name of the object. Read/write String.

Nodes Nodes Nodes

Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to ShapeRange objects that represent freeform drawings.

Parent Parent Parent

Returns the parent object for the specified object. Read-only.

ParentGroup ParentGroup ParentGroup

Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.

PictureFormat PictureFormat PictureFormat

Returns a PictureFormat object that contains picture formatting properties for the specified shape. Applies to ShapeRange objects that represent pictures or OLE objects. Read-only.

Reflection Reflection Reflection

Returns a Microsoft.Office.Core.ReflectionFormat object for a specified shape range that contains reflection formatting properties for the shape range. Read-only.

Rotation Rotation Rotation

Returns or sets the rotation of the shape in degrees. Read/write Single.

Shadow Shadow Shadow

True if the font is a shadow font or if the object has a shadow. Read/write Boolean.

ShapeStyle ShapeStyle ShapeStyle

Returns or sets a Microsoft.Office.Core.MsoShapeStyleIndex that represents shape style for a shape range. Read/write.

SoftEdge SoftEdge SoftEdge

Returns an object that contains soft edge formatting properties for a specified shape range. Read-only.

TextEffect TextEffect TextEffect

Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to ShapeRange objects that represent WordArt. Read-only.

TextFrame TextFrame TextFrame

Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape range. Read-only.

TextFrame2 TextFrame2 TextFrame2

Returns an object that contains text formatting for the specified shape range. Read-only.

ThreeD ThreeD ThreeD

Returns a ThreeDFormat object that contains 3-D – effect formatting properties for the specified shape. Read-only.

Title Title Title

Gets or sets the title of the alternative text associated with the specified shape range.

Top Top Top

The distance from the top edge of the topmost shape in the shape range to the top edge of the worksheet. Read/write Single.

Type Type Type

Returns or sets the shape type. Read-only Microsoft.Office.Core.MsoShapeType.

VerticalFlip VerticalFlip VerticalFlip

True if the specified shape is flipped around the vertical axis. Read-only Microsoft.Office.Core.MsoTriState.

Vertices Vertices Vertices

Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only Object.

Visible Visible Visible

Determines whether the object is visible. Read/write Microsoft.Office.Core.MsoTriState.

Width Width Width

The width of the object. Read/write Single.

ZOrderPosition ZOrderPosition ZOrderPosition

Returns the position of the specified shape in the z-order. Read-only Integer.

Methods

_Default(Object) _Default(Object) _Default(Object)

Reserved for internal use.

Align(MsoAlignCmd, MsoTriState) Align(MsoAlignCmd, MsoTriState) Align(MsoAlignCmd, MsoTriState)

Aligns the shapes in the specified range of shapes.

Apply() Apply() Apply()

Applies to the specified shape formatting that’s been copied by using the PickUp() method.

CanvasCropBottom(Single) CanvasCropBottom(Single) CanvasCropBottom(Single)

Reserved for internal use.

CanvasCropLeft(Single) CanvasCropLeft(Single) CanvasCropLeft(Single)

Reserved for internal use.

CanvasCropRight(Single) CanvasCropRight(Single) CanvasCropRight(Single)

Reserved for internal use.

CanvasCropTop(Single) CanvasCropTop(Single) CanvasCropTop(Single)

Reserved for internal use.

Delete() Delete() Delete()

Deletes the object.

Distribute(MsoDistributeCmd, MsoTriState) Distribute(MsoDistributeCmd, MsoTriState) Distribute(MsoDistributeCmd, MsoTriState)

Horizontally or vertically distributes the shapes in the specified range of shapes.

Duplicate() Duplicate() Duplicate()

Duplicates the object and returns a reference to the new copy.

Flip(MsoFlipCmd) Flip(MsoFlipCmd) Flip(MsoFlipCmd)

Flips the specified shape around its horizontal or vertical axis.

GetEnumerator() GetEnumerator() GetEnumerator()
Group() Group() Group()

Groups the shapes in the specified range. Returns the grouped shapes as a single Shape object.

IncrementLeft(Single) IncrementLeft(Single) IncrementLeft(Single)

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

IncrementRotation(Single) IncrementRotation(Single) IncrementRotation(Single)

Changes the rotation of the specified shape around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape.

IncrementTop(Single) IncrementTop(Single) IncrementTop(Single)

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

Item(Object) Item(Object) Item(Object)

Returns a single object from a collection.

PickUp() PickUp() PickUp()

Copies the formatting of the specified shape. Use the Apply() method to apply the copied formatting to another shape.

Regroup() Regroup() Regroup()

Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.

RerouteConnections() RerouteConnections() RerouteConnections()

Reroutes connectors so that they take the shortest possible path between the shapes they connect.

ScaleHeight(Single, MsoTriState, Object) ScaleHeight(Single, MsoTriState, Object) ScaleHeight(Single, MsoTriState, Object)

Scales the height of the shape by a specified factor.

ScaleWidth(Single, MsoTriState, Object) ScaleWidth(Single, MsoTriState, Object) ScaleWidth(Single, MsoTriState, Object)

Scales the width of the shape by a specified factor.

Select(Object) Select(Object) Select(Object)

Selects the object.

SetShapesDefaultProperties() SetShapesDefaultProperties() SetShapesDefaultProperties()

Makes the formatting of the specified shape the default formatting for the shape.

Ungroup() Ungroup() 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.

ZOrder(MsoZOrderCmd) ZOrder(MsoZOrderCmd) ZOrder(MsoZOrderCmd)

Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).

Applies to