ShapeRange Object Members

Publisher Developer Reference

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. You can include whichever shapes you want — chosen from among all the shapes in 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 in a document, all the selected shapes in a document, or all the freeform shapes in a document. Most operations that you can do with a Shape object, you can also do with a ShapeRange object that contains only one shape. Some operations, when performed on a ShapeRange object that contains more than one shape, will cause an error. This section describes how to: Return a set of shapes. Return a ShapeRange object within a selection or range. Align, distribute, and group shapes in a ShapeRange object.

Methods

  Name Description
Aa438794.methods(en-us,office.12).gif AddToCatalogMergeArea Adds the specified shape or shapes to the publication page's catalog merge area.
Aa438794.methods(en-us,office.12).gif Align Aligns all the shapes in the specified ShapeRange object.
Aa438794.methods(en-us,office.12).gif Apply Applies formatting copied from another shape or shape range using the PickUp method.
Aa438794.methods(en-us,office.12).gif Copy Copies the specified object to the Clipboard.
Aa438794.methods(en-us,office.12).gif Cut Deletes the specified object and places it on the Clipboard.
Aa438794.methods(en-us,office.12).gif Delete Deletes the specified object.
Aa438794.methods(en-us,office.12).gif Distribute Evenly distributes the shapes in the specified shape range.
Aa438794.methods(en-us,office.12).gif Duplicate Creates a duplicate of the specified Shape or ShapeRange object, adds the new shape or range of shapes to the Shapes collection immediately after the shape or range of shapes specified originally, and then returns the new Shape or ShapeRange object.
Aa438794.methods(en-us,office.12).gif Flip Flips the specified shape around its horizontal or vertical axis, or flips all the shapes in the specified shape range around their horizontal or vertical axes.
Aa438794.methods(en-us,office.12).gif GetHeight Returns the height of the shape or shape range as a Single in the specified units.
Aa438794.methods(en-us,office.12).gif GetLeft Returns the distance of the shape’s or shape range's left edge from the left edge of the leftmost page in the current view as a Single in the specified units.
Aa438794.methods(en-us,office.12).gif GetTop Returns the distance of the shape’s or shape range's top edge from the top edge of the leftmost page in the current view as a Single in the specified units.
Aa438794.methods(en-us,office.12).gif GetWidth Returns the width of the shape or shape range as a Single in the specified units.
Aa438794.methods(en-us,office.12).gif Group Groups the shapes in the specified shape range. Returns the grouped shapes as a single Shape object.
Aa438794.methods(en-us,office.12).gif IncrementLeft Moves the specified shape or shape range horizontally by the specified distance.
Aa438794.methods(en-us,office.12).gif IncrementRotation Changes the rotation of the specified shape around the z-axis (extends outward from the plane of the publication) by the specified number of degrees.
Aa438794.methods(en-us,office.12).gif IncrementTop Moves the specified shape or shape range vertically by the specified distance.
Aa438794.methods(en-us,office.12).gif Item Returns an individual object in a specified collection.
Aa438794.methods(en-us,office.12).gif MoveIntoTextFlow Moves a given shape into the text flow defined by TextRange Object. The shape will always be inserted inline at the beginning of the text flow.
Aa438794.methods(en-us,office.12).gif MoveOutOfTextFlow Moves a given inline shape out of its containing text range, defined by TextRange Object, and makes the shape fixed.
Aa438794.methods(en-us,office.12).gif PickUp Copies formatting from a shape or shape range so that it can be copied to another shape or shape range using the Apply method
Aa438794.methods(en-us,office.12).gif Regroup Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.
Aa438794.methods(en-us,office.12).gif RemoveFromCatalogMergeArea Removes a shape from the specified page's catalog merge area. Removed shapes are not deleted, but instead remain in place on the page containing the catalog merge area.
Aa438794.methods(en-us,office.12).gif RerouteConnections Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
Aa438794.methods(en-us,office.12).gif SaveAsPicture Saves multiple shapes to a picture file.
Aa438794.methods(en-us,office.12).gif ScaleHeight Scales the height of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size.
Aa438794.methods(en-us,office.12).gif ScaleWidth Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size.
Aa438794.methods(en-us,office.12).gif Select Selects the specified object.
Aa438794.methods(en-us,office.12).gif SetShapesDefaultProperties Applies the formatting for the specified shape or shape range to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Aa438794.methods(en-us,office.12).gif Ungroup Ungroups the specified group of shapes or any groups of shapes in the specified shape range. If the specified shape is a picture or OLE object, Microsoft Publisher will break it apart and convert it to an ungrouped set of shapes. (For example, an embedded Microsoft Excel spreadsheet is converted into lines and text boxes.) Returns the ungrouped shapes as a single ShapeRange object.
Aa438794.methods(en-us,office.12).gif 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).

Properties

  Name Description
Aa438794.properties(en-us,office.12).gif Adjustments Returns an Adjustments collection representing all adjustment handles for the specified Shape or ShapeRange object.
Aa438794.properties(en-us,office.12).gif AlternativeText Returns or sets a String representing the text displayed by a Web browser in place of the Shape object while the Shape object is being downloaded or when graphics are turned off. Read/write.
Aa438794.properties(en-us,office.12).gif Application Used without an object qualifier, this property returns an Application object that represents the current instance of Publisher. Used with an object qualifier, this property returns an Application object that represents the creator of the specified object. When used with an OLE Automation object, it returns the object's application.
Aa438794.properties(en-us,office.12).gif AutoShapeType Returns or sets an MsoAutoShapeType which specifies a Shape object's AutoShape type.
Aa438794.properties(en-us,office.12).gif BlackWhiteMode Returns or sets an MsoBlackWhiteMode constant indicating how the specified shape or shape range appears when the publication is viewed in black-and-white mode. Read/write.
Aa438794.properties(en-us,office.12).gif Callout Returns a CalloutFormat object representing the formatting of a line callout.
Aa438794.properties(en-us,office.12).gif ConnectionSiteCount Returns a Long indicating the count of connection sites on the current Shape object. Read-only.
Aa438794.properties(en-us,office.12).gif Connector Returns an MsoTriState value indicating whether the specified shape is a connector. Read-only.
Aa438794.properties(en-us,office.12).gif ConnectorFormat Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors.
Aa438794.properties(en-us,office.12).gif Count Returns a Long that represents the number of items in the specified collection.
Aa438794.properties(en-us,office.12).gif Fill Returns a FillFormat object representing the fill for the specified shape or table cell.
Aa438794.properties(en-us,office.12).gif GroupItems Returns a GroupShapes collection if the specified shape is a group.
Aa438794.properties(en-us,office.12).gif HasTable Returns msoTrue if the shape represents a TableFrame object or msoFalse if the shape represents any other object type. Read-only MsoTriState.
Aa438794.properties(en-us,office.12).gif HasTextFrame Returns an MsoTriState constant if the specified shape has a TextFrame object associated with it. Read-only.
Aa438794.properties(en-us,office.12).gif Height Returns a Variant that represents the height (in points) of a specified range of shapes. Read-only.
Aa438794.properties(en-us,office.12).gif HorizontalFlip Returns msoTrue if the specified shape has been flipped around its horizontal axis. Read-only MsoTriState.
Aa438794.properties(en-us,office.12).gif Hyperlink Returns a Hyperlink object representing the hyperlink associated with the specified shape.
Aa438794.properties(en-us,office.12).gif ID Returns a Long that represents the type of a shape, range of shapes, or property, type, or value of a wizard. Read-only.
Aa438794.properties(en-us,office.12).gif InlineAlignment Returns or sets a PbInlineAlignment constant that indicates whether an inline shape has left, right, or in-text alignment. Read/write.
Aa438794.properties(en-us,office.12).gif InlineTextRange Returns a TextRange object that reflects the position of the inline shape in its containing text range. Read-only.
Aa438794.properties(en-us,office.12).gif IsInline Returns an MsoTriState constant that specifies whether a shape is inline. Read-only.
Aa438794.properties(en-us,office.12).gif Left Returns a Variant indicating the distance from the left edge of the page to the leftmost edge of all the shapes in the specified shape range. Numeric values are in points; all other values are in any measurement supported by Publisher (for example, "2.5 in"). Read-only.
Aa438794.properties(en-us,office.12).gif Line Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.)
Aa438794.properties(en-us,office.12).gif LinkFormat Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.
Aa438794.properties(en-us,office.12).gif LockAspectRatio Returns or sets an MsoTriState constant indicating whether the specified shape retains its original proportions when you resize it. Read/write.
Aa438794.properties(en-us,office.12).gif Name Returns or sets a String value indicating the name of the specified object. Read/write.
Aa438794.properties(en-us,office.12).gif Nodes Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape or ShapeRange objects that represent freeform drawings.
Aa438794.properties(en-us,office.12).gif OLEFormat Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects.
Aa438794.properties(en-us,office.12).gif Parent Returns an object that represents the parent object of the specified object. For example, for a TextFrame object, returns a Shape object representing the parent shape of the text frame. Read-only.
Aa438794.properties(en-us,office.12).gif PictureFormat Returns a PictureFormat object that contains picture formatting properties for the specified object. Applies to Shape or ShapeRange objects that represent pictures or OLE objects. Read-only.
Aa438794.properties(en-us,office.12).gif Rotation Returns or sets a Single that represents the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write.
Aa438794.properties(en-us,office.12).gif Shadow Returns a ShadowFormat object that represents the shadow formatting for the specified shape.
Aa438794.properties(en-us,office.12).gif Table Returns a Table object that represents a table in Microsoft Publisher.
Aa438794.properties(en-us,office.12).gif Tags Returns a Tags collection representing tags or custom properties applied to a shape, shape range, page, or publication.
Aa438794.properties(en-us,office.12).gif TextEffect Returns a TextEffectFormat object that represents the text formatting properties of a WordArt object.
Aa438794.properties(en-us,office.12).gif TextFrame Returns a TextFrame object that represents the text in a shape as well as the properties that control the margins and orientation of the text.
Aa438794.properties(en-us,office.12).gif TextWrap Returns a WrapFormat object that represents the properties for wrapping text around a shape or shape range.
Aa438794.properties(en-us,office.12).gif ThreeD Returns a ThreeDFormat object.
Aa438794.properties(en-us,office.12).gif Top Returns a Variant that represents the distance between the top of the page and the top shape in a range of shapes. Read-only.
Aa438794.properties(en-us,office.12).gif Type Returns a PbShapeType constant that represents the shape type. Read-only.
Aa438794.properties(en-us,office.12).gif VerticalFlip Returns msoTrue if the specified shape has been flipped around its vertical axis. Read-only MsoTriState.
Aa438794.properties(en-us,office.12).gif 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 Variant.
Aa438794.properties(en-us,office.12).gif Width Returns a Variant that represents the width (in points) of a specified range of shapes. Read-only.
Aa438794.properties(en-us,office.12).gif Wizard Returns a Wizard object representing the publication design associated with the specified publication or the wizard associated with the specified Design Gallery object.
Aa438794.properties(en-us,office.12).gif WizardTag Returns or sets a PbWizardTag constant indicating the function of a specified shape with respect to its publication design. Read/write.
Aa438794.properties(en-us,office.12).gif WizardTagInstance Returns or sets a Long indicating the instance of the specified shape compared with other shapes having the same wizard tag. Read/write.
Aa438794.properties(en-us,office.12).gif ZOrderPosition Returns a Long indicating the position of the specified shape or shape range in the z-order. Read-only.