Shape Object Members

Visio Automation Reference

Represents anything you can select in a drawing window: a basic shape, a group, a guide, or an object from another application embedded or linked in Microsoft Office Visio.

Methods

  Name Description
Aa342282.methods(en-us,office.12).gif AddGuide Adds a guide to a group shape.
Aa342282.methods(en-us,office.12).gif AddHyperlink Adds a Hyperlink object to a Microsoft Office Visio shape.
Aa342282.methods(en-us,office.12).gif AddNamedRow Adds a row that has the specified name to the specified ShapeSheet section.
Aa342282.methods(en-us,office.12).gif AddRow Adds a row to a ShapeSheet section at a specified position.
Aa342282.methods(en-us,office.12).gif AddRows Adds the specified number of rows to a ShapeSheet section at a specified position.
Aa342282.methods(en-us,office.12).gif AddSection Adds a new section to a ShapeSheet spreadsheet.
Aa342282.methods(en-us,office.12).gif AutoConnect Automatically draws a connection in the specified direction between the shape and another shape on the drawing page.
Aa342282.methods(en-us,office.12).gif BoundingBox Returns a rectangle that tightly encloses a shape.
Aa342282.methods(en-us,office.12).gif BreakLinkToData Breaks the link between the shape and the data row to which it is linked in the specified data recordset.
Aa342282.methods(en-us,office.12).gif BringForward Brings the shape or selected shapes forward one position in the z-order.
Aa342282.methods(en-us,office.12).gif BringToFront Brings the shape or selected shapes to the front of the z-order.
Aa342282.methods(en-us,office.12).gif CenterDrawing Centers a page's, master's, or group's shapes with respect to the extent of the page, master, or group.
Aa342282.methods(en-us,office.12).gif ConvertToGroup Converts a selection or an object from another application (a linked or embedded object) to a group.
Aa342282.methods(en-us,office.12).gif Copy Copies a shape to the Clipboard.
Aa342282.methods(en-us,office.12).gif CreateSelection Creates various types of Selection objects.
Aa342282.methods(en-us,office.12).gif Cut Deletes an object or selection and places it on the Clipboard.
Aa342282.methods(en-us,office.12).gif Delete Deletes an object or selection.
Aa342282.methods(en-us,office.12).gif DeleteRow Deletes a row from a section in a ShapeSheet spreadsheet.
Aa342282.methods(en-us,office.12).gif DeleteSection Deletes a ShapeSheet section.
Aa342282.methods(en-us,office.12).gif DrawArcByThreePoints Creates a new shape whose path consists of an arc defined by the three points passed as parameters.
Aa342282.methods(en-us,office.12).gif DrawBezier Creates a new shape whose path is defined by the supplied sequence of Bezier control points.
Aa342282.methods(en-us,office.12).gif DrawCircularArc Creates a new shape whose path consists of a circular arc defined by its center, radius, and start and end angles.
Aa342282.methods(en-us,office.12).gif DrawLine Adds a line to the Shapes collection of a group shape.
Aa342282.methods(en-us,office.12).gif DrawNURBS Creates a new shape whose path consists of a single NURBS (nonuniform rational B-spline) segment.
Aa342282.methods(en-us,office.12).gif DrawOval Adds an oval (ellipse) to the Shapes collection of a group shape.
Aa342282.methods(en-us,office.12).gif DrawPolyline Creates a new shape whose path is a polyline along a given set of points.
Aa342282.methods(en-us,office.12).gif DrawQuarterArc Creates a new shape whose path consists of an elliptical arc defined by the two points and the flag passed in as arguments.
Aa342282.methods(en-us,office.12).gif DrawRectangle Adds a rectangle to the Shapes collection of a page, master, or group.
Aa342282.methods(en-us,office.12).gif DrawSpline Creates a new shape whose path follows a given sequence of points.
Aa342282.methods(en-us,office.12).gif Drop Creates one or more new Shape objects by dropping an object onto a receiving object such as a master, drawing page, shape, or group.
Aa342282.methods(en-us,office.12).gif DropMany Creates one or more new Shape objects in a group. It returns an array of the IDs of the Shape objects it produces.
Aa342282.methods(en-us,office.12).gif DropManyU Creates one or more new Shape objects on a page, in a master, or in a group. It returns an array of the IDs of the Shape objects it produces.
Aa342282.methods(en-us,office.12).gif Duplicate Duplicates an object.
Aa342282.methods(en-us,office.12).gif Export Exports an object from Microsoft Office Visio to a file format such as .bmp, .dib, .dwg, .dxf, .emf, .emz, .gif, .htm, .jpg, .png, .svg, .svgz, .tif, or .wmf.
Aa342282.methods(en-us,office.12).gif FitCurve Reduces the number of geometry segments in a shape or shapes by replacing them with similar spline, arc, and line segments that approximate the paths of the initial segments. Typically, this reduces the number of segments in the shape.
Aa342282.methods(en-us,office.12).gif FlipHorizontal Flips an object horizontally.
Aa342282.methods(en-us,office.12).gif FlipVertical Flips an object vertically.
Aa342282.methods(en-us,office.12).gif GetCustomPropertiesLinkedToData Gets the IDs of the shape-data-item (custom property) rows in the Shape Data section of the shape's ShapeSheet spreadsheet linked to the specified data recordset.
Aa342282.methods(en-us,office.12).gif GetCustomPropertyLinkedColumn Gets the name of the data column linked to the shape data (custom property) row in the shape's ShapeSheet spreadsheet specified by the custom property index.
Aa342282.methods(en-us,office.12).gif GetFormulas Returns the formulas of many cells.
Aa342282.methods(en-us,office.12).gif GetFormulasU Returns the formulas of many cells.
Aa342282.methods(en-us,office.12).gif GetLinkedDataRecordsetIDs Gets the IDs of all the data recordsets that contain data rows linked to the shape.
Aa342282.methods(en-us,office.12).gif GetLinkedDataRow Gets the ID of the data row in the specified data recordset linked to the shape.
Aa342282.methods(en-us,office.12).gif GetResults Gets the results or formulas of many cells.
Aa342282.methods(en-us,office.12).gif Group Groups the objects that are selected in a selection, or it converts a shape into a group.
Aa342282.methods(en-us,office.12).gif HitTest Determines if a given x,y position hits outside, inside, or on the boundary of a shape.
Aa342282.methods(en-us,office.12).gif Import Imports a file into the current document.
Aa342282.methods(en-us,office.12).gif InsertFromFile Adds a linked or embedded object to a page, master, or group.
Aa342282.methods(en-us,office.12).gif InsertObject Adds a new embedded object or ActiveX control to a page, master, or group.
Aa342282.methods(en-us,office.12).gif IsCustomPropertyLinked Returns whether the shape data (custom property) row in the Shape Data section of the shape's ShapeSheet spreadsheet is linked to a data row in the specified data recordset.
Aa342282.methods(en-us,office.12).gif Layout Lays out the shapes and/or reroutes the connectors for the page, master, group, or selection.
Aa342282.methods(en-us,office.12).gif LinkToData Links a shape to a data row in a data recordset.
Aa342282.methods(en-us,office.12).gif Offset Offsets a shape a specified amount.
Aa342282.methods(en-us,office.12).gif OpenDrawWindow Opens a new drawing window that displays a group.
Aa342282.methods(en-us,office.12).gif OpenSheetWindow Opens a ShapeSheet window for a Shape object.
Aa342282.methods(en-us,office.12).gif Paste Pastes the contents of the Clipboard into an object.
Aa342282.methods(en-us,office.12).gif PasteSpecial Inserts the contents of the Clipboard, allowing you to control the format of the pasted information and (optionally) establish a link to the source file (for example, a Microsoft Word document).
Aa342282.methods(en-us,office.12).gif ReverseEnds Reverses an object by flipping it both horizontally and vertically.
Aa342282.methods(en-us,office.12).gif Rotate90 Rotates an object 90 degrees counterclockwise.
Aa342282.methods(en-us,office.12).gif SendBackward Moves a shape or selected shapes back one position in the z-order.
Aa342282.methods(en-us,office.12).gif SendToBack Moves the shape or selected shapes to the back of the z-order.
Aa342282.methods(en-us,office.12).gif SetBegin Moves the begin point of a one-dimensional (1-D) shape to the coordinates represented by xPos and yPos.
Aa342282.methods(en-us,office.12).gif SetCenter Moves a shape so that its pin is positioned at the coordinates represented by xPos and yPos.
Aa342282.methods(en-us,office.12).gif SetEnd Moves the end point of a one-dimensional (1-D) shape to the coordinates represented by xPos and yPos.
Aa342282.methods(en-us,office.12).gif SetFormulas Sets the formulas of one or more cells.
Aa342282.methods(en-us,office.12).gif SetResults Sets the results or formulas of one or more cells.
Aa342282.methods(en-us,office.12).gif SwapEnds Swaps the begin and end points of a one-dimensional (1-D) shape.
Aa342282.methods(en-us,office.12).gif TransformXYFrom Transforms a point expressed in the local coordinate system of one Shape object from an equivalent point expressed in the local coordinate system of another Shape object.
Aa342282.methods(en-us,office.12).gif TransformXYTo Transforms a point expressed in the local coordinate system of one Shape object to an equivalent point expressed in the local coordinate system of another Shape object.
Aa342282.methods(en-us,office.12).gif Ungroup Ungroups a group.
Aa342282.methods(en-us,office.12).gif UpdateAlignmentBox Updates the alignment box for a shape.
Aa342282.methods(en-us,office.12).gif XYFromPage Transforms a point expressed in the local coordinate system of its Page or Master object to an equivalent point expressed in the local coordinate system of the Shape object.
Aa342282.methods(en-us,office.12).gif XYToPage Transforms a point expressed in the local coordinate system of a Shape object to an equivalent point expressed in the local coordinate system of its Page or Master object.

Properties

  Name Description
Aa342282.properties(en-us,office.12).gif Application Read-only. Returns the instance of Microsoft Office Visio that is associated with an object.
Aa342282.properties(en-us,office.12).gif AreaIU Returns the area of a Shape object in internal units (square inches). Read-only.
Aa342282.properties(en-us,office.12).gif CellExists Determines whether a particular ShapeSheet cell exists in the scope of the search. Read-only.
Aa342282.properties(en-us,office.12).gif CellExistsU Determines whether a particular ShapeSheet cell exists in the scope of the search. Read-only.
Aa342282.properties(en-us,office.12).gif Cells Returns a Cell object that represents a ShapeSheet cell. Read-only.
Aa342282.properties(en-us,office.12).gif CellsRowIndex Returns the index of a row to which a cell belongs. Read-only.
Aa342282.properties(en-us,office.12).gif CellsRowIndexU Returns the index of a row to which a cell belongs. Read-only.
Aa342282.properties(en-us,office.12).gif CellsSRC Returns a Cell object that represents a ShapeSheet cell identified by section, row, and column indices. Read-only.
Aa342282.properties(en-us,office.12).gif CellsSRCExists Determines whether a ShapeSheet cell exists in the scope of a search. Read-only.
Aa342282.properties(en-us,office.12).gif CellsU Returns a Cell object that represents a ShapeSheet cell. Read-only.
Aa342282.properties(en-us,office.12).gif Characters Returns a Characters object that represents the text of a shape. Read-only.
Aa342282.properties(en-us,office.12).gif CharCount Returns the number of characters in an object. Read-only.
Aa342282.properties(en-us,office.12).gif ClassID Returns the class ID string of a shape that represents an ActiveX control or an embedded or linked OLE object. Read-only.
Aa342282.properties(en-us,office.12).gif Connects Returns a Connects collection for a shape, page, or master. Read-only.
Aa342282.properties(en-us,office.12).gif ContainingMaster Returns the Master object that contains an object. Read-only.
Aa342282.properties(en-us,office.12).gif ContainingMasterID Returns the ID of the Master object that contains an object. Read-only.
Aa342282.properties(en-us,office.12).gif ContainingPage Returns the page that contains an object.
Aa342282.properties(en-us,office.12).gif ContainingPageID Returns the ID of the page that contains an object. Read-only
Aa342282.properties(en-us,office.12).gif ContainingShape Returns the Shape object that contains an object or collection. Read-only
Aa342282.properties(en-us,office.12).gif Data1 Gets or sets the value of the Data1 field for a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif Data2 Gets or sets the value of the Data2 field for a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif Data3 Gets or sets the value of the Data2 field for a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif DataGraphic Gets or sets the data graphic master (Master of type visTypeDataGraphic) that is associated with the shape. Read/write.
Aa342282.properties(en-us,office.12).gif DistanceFrom Returns the distance from one shape to another. Both shapes must be on the same page or in the same master. Read-only.
Aa342282.properties(en-us,office.12).gif DistanceFromPoint Returns the distance from a shape to a point. Read-only.
Aa342282.properties(en-us,office.12).gif Document Gets the Document object that is associated with an object. Read-only.
Aa342282.properties(en-us,office.12).gif EventList Returns the EventList collection of an object or the EventList collection that contains an Event object. Read-only.
Aa342282.properties(en-us,office.12).gif FillStyle Returns or sets the fill style for an object. Read/write.
Aa342282.properties(en-us,office.12).gif FillStyleKeepFmt Applies a fill style to an object while preserving local formatting. Read/write.
Aa342282.properties(en-us,office.12).gif ForeignData Returns metafile, bitmap, or OLE data for a shape that represents a foreign object. Read-only.
Aa342282.properties(en-us,office.12).gif ForeignType Returns the subtype of a Shape object that represents a foreign object. Read-only.
Aa342282.properties(en-us,office.12).gif FromConnects Returns a Connects collection of the shapes connected to a shape. Read-only.
Aa342282.properties(en-us,office.12).gif GeometryCount Returns the number of Geometry sections for a shape. Read-only.
Aa342282.properties(en-us,office.12).gif Help Gets or sets the Help string for a shape. Read/write.
Aa342282.properties(en-us,office.12).gif Hyperlinks Returns the Hyperlinks collection for a Shape object. Read-only.
Aa342282.properties(en-us,office.12).gif ID Gets the ID of an object. Read-only.
Aa342282.properties(en-us,office.12).gif Index Gets the ordinal position of a Shape object in the Shapes collection. Read-only.
Aa342282.properties(en-us,office.12).gif IsOpenForTextEdit Indicates whether a shape is currently open for interactive text editing. Read-only.
Aa342282.properties(en-us,office.12).gif Language Represents the language ID of the version of the Microsoft Office Visio instance represented by the parent object. Read/write.
Aa342282.properties(en-us,office.12).gif Layer Returns the layer to which a shape is assigned. Read-only.
Aa342282.properties(en-us,office.12).gif LayerCount Returns the number of layers to which a shape is assigned. Read-only.
Aa342282.properties(en-us,office.12).gif LengthIU Returns the length (perimeter) of the Shape in internal units. Read-only.
Aa342282.properties(en-us,office.12).gif LineStyle Specifies the line style for an object. Read/write.
Aa342282.properties(en-us,office.12).gif LineStyleKeepFmt Applies a line style to an object while preserving local formatting. Read/write.
Aa342282.properties(en-us,office.12).gif Master Returns the master from which the Shape object was created. Read-only.
Aa342282.properties(en-us,office.12).gif MasterShape If this shape is part of a master instance, returns the shape in the master that this shape inherits from. Read-only.
Aa342282.properties(en-us,office.12).gif Name Specifies the name of an object. Read-only.
Aa342282.properties(en-us,office.12).gif NameID Returns a unique name for a shape. Read-only.
Aa342282.properties(en-us,office.12).gif NameU Specifies the universal name of a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif Object Returns an IDispatch interface on the ActiveX control or embedded or linked OLE 2.0 object represented by a Shape object or an OLEObject object. Read-only.
Aa342282.properties(en-us,office.12).gif ObjectIsInherited Indicates if a shape represents an ActiveX or OLE object that is inherited from the shape's master. Read-only.
Aa342282.properties(en-us,office.12).gif ObjectType Returns an object's type. Read-only.
Aa342282.properties(en-us,office.12).gif OneD Determines whether an object behaves as a one-dimensional (1-D) object. Read-only.
Aa342282.properties(en-us,office.12).gif Parent Determines the parent of a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif Paths Returns a Paths collection that reports the coordinates of a shape's paths in the coordinate system of the shape's parent. Read-only.
Aa342282.properties(en-us,office.12).gif PathsLocal Returns a Paths collection that reports the coordinates of a shape's paths in the shape's local coordinate system. Read-only.
Aa342282.properties(en-us,office.12).gif PersistsEvents Indicates whether an object is capable of containing persistent events in its EventList collection. Read-only.
Aa342282.properties(en-us,office.12).gif Picture Returns a picture that represents an enhanced metafile (EMF) contained in a master, shape, selection, or page. Read-only.
Aa342282.properties(en-us,office.12).gif ProgID Returns the programmatic identifier of a shape that represents an ActiveX control, an embedded object, or linked object. Read-only.
Aa342282.properties(en-us,office.12).gif RootShape Returns the top-level shape of an instance if this shape is part of a master instance. Read-only.
Aa342282.properties(en-us,office.12).gif RowCount Returns the number of rows in a ShapeSheet section. Read-only.
Aa342282.properties(en-us,office.12).gif RowExists Determines whether a ShapeSheet row exists. Read-only.
Aa342282.properties(en-us,office.12).gif RowsCellCount Returns the number of cells in a row of a ShapeSheet section. Read-only.
Aa342282.properties(en-us,office.12).gif RowType Gets or sets the type of a row in a Geometry, Connection Points, Controls, or Tabs ShapeSheet section. Read/write.
Aa342282.properties(en-us,office.12).gif Section Returns the requested Section object belonging to a shape. Read-only.
Aa342282.properties(en-us,office.12).gif SectionExists Determines whether a ShapeSheet section exists for a particular shape. Read-only.
Aa342282.properties(en-us,office.12).gif Shapes Returns the Shapes collection for a page, master, or group. Read-only.
Aa342282.properties(en-us,office.12).gif SpatialNeighbors Returns a Selection object that represents the shapes that meet certain criteria in relation to a specified shape. Read-only.
Aa342282.properties(en-us,office.12).gif SpatialRelation Returns an integer that represents the spatial relationship of one shape to another shape. Both shapes must be on the same page or in the same master. Read-only.
Aa342282.properties(en-us,office.12).gif SpatialSearch Returns a Selection object whose shapes meet certain criteria in relation to a point that is expressed in the coordinate space of a page, master, or group. Read-only.
Aa342282.properties(en-us,office.12).gif Stat Returns status information for an object. Read-only.
Aa342282.properties(en-us,office.12).gif Style Gets or sets the style for a Shape object. Read/write.
Aa342282.properties(en-us,office.12).gif StyleKeepFmt Applies a style to an object while preserving local formatting. Read/write
Aa342282.properties(en-us,office.12).gif Text Returns all of the shape's text. Read/write.
Aa342282.properties(en-us,office.12).gif TextStyle Gets or sets the text style for an object. Read/write.
Aa342282.properties(en-us,office.12).gif TextStyleKeepFmt Applies a text style to an object while preserving local formatting. Read/write.
Aa342282.properties(en-us,office.12).gif Type Returns the type of the object. Read-only.
Aa342282.properties(en-us,office.12).gif UniqueID Gets, deletes, or makes the GUID that uniquely identifies the shape within the scope of the application. Read-only.

Events

  Name Description
Aa342282.events(en-us,office.12).gif BeforeSelectionDelete Occurs before selected objects are deleted.
Aa342282.events(en-us,office.12).gif BeforeShapeDelete Occurs before a shape is deleted.
Aa342282.events(en-us,office.12).gif BeforeShapeTextEdit Occurs before a shape is opened for text editing in the user interface.
Aa342282.events(en-us,office.12).gif CellChanged Occurs after the value changes in a cell in a document.
Aa342282.events(en-us,office.12).gif ConvertToGroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelConvertToGroup event.
Aa342282.events(en-us,office.12).gif FormulaChanged Occurs after a formula changes in a cell in the object that receives the event.
Aa342282.events(en-us,office.12).gif GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
Aa342282.events(en-us,office.12).gif QueryCancelConvertToGroup Occurs before the application converts a selection of shapes to a group in response to a user action in the interface. If any event handler returns True, the operation is canceled.
Aa342282.events(en-us,office.12).gif QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
Aa342282.events(en-us,office.12).gif QueryCancelSelectionDelete Occurs before the application deletes a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
Aa342282.events(en-us,office.12).gif QueryCancelUngroup Occurs before the application ungroups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
Aa342282.events(en-us,office.12).gif SelectionAdded Occurs after one or more shapes are added to a document.
Aa342282.events(en-us,office.12).gif SelectionDeleteCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelSelectionDelete event.
Aa342282.events(en-us,office.12).gif ShapeAdded Occurs after one or more shapes are added to a document.
Aa342282.events(en-us,office.12).gif ShapeChanged Occurs after a property of a shape that is not stored in a cell is changed in a document.
Aa342282.events(en-us,office.12).gif ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
Aa342282.events(en-us,office.12).gif ShapeExitedTextEdit Occurs after a shape is no longer open for interactive text editing.
Aa342282.events(en-us,office.12).gif ShapeLinkAdded Occurs after a shape is linked to a data row.
Aa342282.events(en-us,office.12).gif ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.
Aa342282.events(en-us,office.12).gif ShapeParentChanged Occurs after shapes are grouped or a group is ungrouped.
Aa342282.events(en-us,office.12).gif TextChanged Occurs after the text of a shape is changed in a document.
Aa342282.events(en-us,office.12).gif UngroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelUngroup event.