Edytuj

Udostępnij za pośrednictwem


Shapes Interface

Definition

A collection of all the Shape objects on the specified sheet.

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

Remarks

Each Shape object represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.

Note: If you want to work with a subset of the shapes on a document — for example, to do something to only the AutoShapes on the document or to only the selected shapes — you must construct a ShapeRange collection that contains the shapes you want to work with.

Properties

Application

Returns an Application object that represents the Microsoft Excel application.

Count

Returns the number of objects in the collection.

Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Parent

Returns the parent object for the specified object.

Range[Object]

Returns a ShapeRange object that represents a subset of the shapes in a Shapes collection.

Methods

_Default(Object)

Reserved for internal use.

AddCallout(MsoCalloutType, Single, Single, Single, Single)

Creates a borderless line callout. Returns a Shape object that represents the new callout.

AddCanvas(Single, Single, Single, Single)

Reserved for internal use.

AddChart(Object, Object, Object, Object, Object)

This object, member, or enumeration is deprecated and is not intended to be used in your code.

AddChart2(Object, Object, Object, Object, Object, Object, Object)

Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.

AddConnector(MsoConnectorType, Single, Single, Single, Single)

Creates a connector. Returns a Shape object that represents the new connector.

AddCurve(Object)

Returns a Shape object that represents a Bézier curve in a worksheet.

AddDiagram(MsoDiagramType, Single, Single, Single, Single)

Creates a diagram. Returns a Shape object that represents the new diagram.

AddFormControl(XlFormControl, Int32, Int32, Int32, Int32)

Creates a Microsoft Excel control. Returns a Shape object that represents the new control.

AddLabel(MsoTextOrientation, Single, Single, Single, Single)

Creates a label. Returns a Shape object that represents the new label.

AddLine(Single, Single, Single, Single)

Returns a Shape object that represents the new line in a worksheet.

AddOLEObject(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Creates an OLE object. Returns a Shape object that represents the new OLE object.

AddPicture(String, MsoTriState, MsoTriState, Single, Single, Single, Single)

Creates a picture from an existing file. Returns a Shape object that represents the new picture.

AddPicture2(String, MsoTriState, MsoTriState, Single, Single, Single, Single, MsoPictureCompress)

Creates a picture from an existing file. Returns a Shape object that represents the new picture.

AddPolyline(Object)

Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.

AddShape(MsoAutoShapeType, Single, Single, Single, Single)

Returns a Shape object that represents the new AutoShape in a worksheet.

AddSmartArt(SmartArtLayout, Object, Object, Object, Object)

Creates a new SmartArt graphic with the specified layout.

AddTextbox(MsoTextOrientation, Single, Single, Single, Single)

Creates a text box. Returns a Shape object that represents the new text box.

AddTextEffect(MsoPresetTextEffect, String, String, Single, MsoTriState, MsoTriState, Single, Single)

Creates a WordArt object. Returns a Shape object that represents the new WordArt object.

BuildFreeform(MsoEditingType, Single, Single)

Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

GetEnumerator()
Item(Object)

Returns a single object from a collection.

SelectAll()

Selects all the shapes in the specified Shapes collection.

Applies to