Compartir a través de


Shape Members

Include Protected Members
Include Inherited Members

Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture. The Shape object is a member of the Shapes collection. The Shapes collection contains all the shapes on a slide.

The Shape type exposes the following members.

Properties

  Name Description
Public property Adjustments Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Read-only.
Public property AlternativeText Returns or sets the descriptive (alternative) text string for a Shape object when the object is saved to a Web page. Read/write String.
Public property Application Returns an Application object that represents the Microsoft Excel application. Read-only.
Public property AutoShapeType Returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write MsoAutoShapeType.
Public property BackgroundStyle Returns or sets the background style. Read/write.
Public property 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 MsoBlackWhiteMode.
Public property BottomRightCell Returns a Range object that represents the cell that lies under the lower-right corner of the object. Read-only.
Public property Callout Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape objects that represent line callouts. Read-only.
Public property CanvasItems Reserved for internal use.
Public property Chart Returns an object that represents the _Chart contained in the Shape. Read-only.
Public property 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 MsoTriState.
Public property ConnectionSiteCount Returns the number of connection sites on the specified shape. Read-only Integer.
Public property Connector True if the specified shape is a connector. Read-only MsoTriState.
Public property ConnectorFormat Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape objects that represent connectors. Read-only.
Public property ControlFormat Returns a ControlFormat object that contains Microsoft Excel control properties. Read-only.
Public property 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.
Public property Diagram Returns a Diagram object representing a diagram.
Public property DiagramNode Returns a DiagramNode object that represents a node in a diagram.
Public property DrawingObject Reserved for internal use.
Public property Fill Returns a FillFormat object that contains fill formatting properties for the specified chart or shape. Read-only.
Public property FormControlType Returns the Microsoft Excel control type. Read-only XlFormControl.
Public property Glow Returns an object for a specified shape that contains glow formatting properties for that shape. Read-only.
Public property 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. Applies to Shape objects that represent grouped shapes. Read-only.
Public property HasChart Returns information on if a Shape contains a chart. Read-only.
Public property HasDiagram Returns whether a shape or shape range contains a diagram. Read-only MsoTriState.
Public property HasDiagramNode Returns a value indicating whether a diagram node exists in a given shape or shape range. Read-only MsoTriState.
Public property HasSmartArt Gets whether there is a SmartArt diagram present on the specified shape.
Public property Height The height of the object. Read/write Single.
Public property HorizontalFlip True if the specified shape is flipped around the horizontal axis. Read-only MsoTriState.
Public property Hyperlink Returns a Hyperlink object that represents the hyperlink for the shape.
Public property ID Returns the type for the specified object. Read-only Integer.
Public property 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.
Public property Line Returns a LineFormat object that contains line formatting properties for the specified shape. Read-only.
Public property LinkFormat Returns a LinkFormat object that contains linked OLE object properties. Read-only.
Public property 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 MsoTriState.
Public property Locked True if the object is locked, False if the object can be modified when the sheet is protected. Read/write Boolean.
Public property Name Returns or sets the name of the object. Read/write String.
Public property Nodes Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape objects that represent freeform drawings.
Public property OLEFormat Returns an OLEFormat object that contains OLE object properties. Read-only.
Public property OnAction Returns or sets the name of a macro that’s run when the specified object is clicked. Read/write String.
Public property Parent Returns the parent object for the specified object. Read-only.
Public property ParentGroup Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
Public property PictureFormat Returns a PictureFormat object that contains picture formatting properties for the specified shape. Applies to Shape objects that represent pictures or OLE objects. Read-only.
Public property Placement Returns or sets the way the object is attached to the cells below it. Read/write XlPlacement.
Public property Reflection Returns an object that contains reflection formatting properties for the shape. Read-only.
Public property Rotation Returns or sets the rotation of the shape in degrees. Read/write Single.
Public property Script Returns the Script object, which represents a block of script or code on the specified Web page. If the page contains no script, nothing is returned.
Public property Shadow True if the object has a shadow. Read/write Boolean.
Public property ShapeStyle Returns or sets a MsoShapeStyleIndex that represents the shape style of the shape. Read/write.
Public property SmartArt Gets an object that represents the SmartArt associated with the shape.
Public property SoftEdge Returns a SoftEdgeFormat object for a specified shape that contains soft edge formatting properties for the shape. Read-only.
Public property TextEffect Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to T:Microsoft.Office.Interop.Excel.Shape objects that represent WordArt. Read-only.
Public property TextFrame Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape. Read-only.
Public property TextFrame2 Returns an object that contains text formatting for the specified shape. Read-only.
Public property ThreeD Returns a ThreeDFormat object that contains 3-D – effect formatting properties for the specified shape. Read-only.
Public property Title Gets or sets the title of the alternative text associated with the specified shape.
Public property 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.
Public property TopLeftCell Returns a Range object that represents the cell that lies under the upper-left corner of the specified object. Read-only.
Public property Type Returns or sets the shape type. Read-only MsoShapeType.
Public property VerticalFlip True if the specified shape is flipped around the vertical axis. Read-only MsoTriState.
Public property 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.
Public property Visible Determines whether the object is visible. Read/write MsoTriState.
Public property Width The width of the object. Read/write Single.
Public property ZOrderPosition Returns the position of the specified shape in the z-order. Read-only Integer.

Top

Methods

  Name Description
Public method Apply Applies to the specified shape formatting that’s been copied by using the PickUp method.
Public method CanvasCropBottom Reserved for internal use.
Public method CanvasCropLeft Reserved for internal use.
Public method CanvasCropRight Reserved for internal use.
Public method CanvasCropTop Reserved for internal use.
Public method Copy Copies the object to the Clipboard.
Public method CopyPicture Copies the selected object to the Clipboard as a picture.
Public method Cut Cuts the object to the Clipboard or pastes it into a specified destination.
Public method Delete Deletes the object.
Public method Duplicate Duplicates the object and returns a reference to the new copy.
Public method Flip Flips the specified shape around its horizontal or vertical axis.
Public method IncrementLeft Moves the specified shape horizontally by the specified number of points.
Public method IncrementRotation 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.
Public method IncrementTop Moves the specified shape vertically by the specified number of points.
Public method PickUp Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
Public method RerouteConnections Reroutes connectors so that they take the shortest possible path between the shapes they connect.
Public method ScaleHeight Scales the height of the shape by a specified factor.
Public method ScaleWidth Scales the width of the shape by a specified factor.
Public method Select Selects the object.
Public method SetShapesDefaultProperties Makes the formatting of the specified shape the default formatting for the shape.
Public method Ungroup Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape. Returns the ungrouped shapes as a single ShapeRange object.
Public method ZOrder 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).

Top

See Also

Reference

Shape Interface

Microsoft.Office.Interop.Excel Namespace