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 | |
---|---|---|
AddToCatalogMergeArea | Adds the specified shape or shapes to the publication page's catalog merge area. | |
Align | Aligns all the shapes in the specified ShapeRange object. | |
Apply | Applies formatting copied from another shape or shape range using the PickUp method. | |
Copy | Copies the specified object to the Clipboard. | |
Cut | Deletes the specified object and places it on the Clipboard. | |
Delete | Deletes the specified object. | |
Distribute | Evenly distributes the shapes in the specified shape range. | |
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. | |
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. | |
GetHeight | Returns the height of the shape or shape range as a Single in the specified units. | |
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. | |
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. | |
GetWidth | Returns the width of the shape or shape range as a Single in the specified units. | |
Group | Groups the shapes in the specified shape range. Returns the grouped shapes as a single Shape object. | |
IncrementLeft | Moves the specified shape or shape range horizontally by the specified distance. | |
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. | |
IncrementTop | Moves the specified shape or shape range vertically by the specified distance. | |
Item | Returns an individual object in a specified collection. | |
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. | |
MoveOutOfTextFlow | Moves a given inline shape out of its containing text range, defined by TextRange Object, and makes the shape fixed. | |
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 | |
Regroup | Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object. | |
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. | |
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. | |
SaveAsPicture | Saves multiple shapes to a picture file. | |
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. | |
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. | |
Select | Selects the specified object. | |
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. | |
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. | |
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 | |
---|---|---|
Adjustments | Returns an Adjustments collection representing all adjustment handles for the specified Shape or ShapeRange object. | |
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. | |
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. | |
AutoShapeType | Returns or sets an MsoAutoShapeType which specifies a Shape object's AutoShape type. | |
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. | |
Callout | Returns a CalloutFormat object representing the formatting of a line callout. | |
ConnectionSiteCount | Returns a Long indicating the count of connection sites on the current Shape object. Read-only. | |
Connector | Returns an MsoTriState value indicating whether the specified shape is a connector. Read-only. | |
ConnectorFormat | Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. | |
Count | Returns a Long that represents the number of items in the specified collection. | |
Fill | Returns a FillFormat object representing the fill for the specified shape or table cell. | |
GroupItems | Returns a GroupShapes collection if the specified shape is a group. | |
HasTable | Returns msoTrue if the shape represents a TableFrame object or msoFalse if the shape represents any other object type. Read-only MsoTriState. | |
HasTextFrame | Returns an MsoTriState constant if the specified shape has a TextFrame object associated with it. Read-only. | |
Height | Returns a Variant that represents the height (in points) of a specified range of shapes. Read-only. | |
HorizontalFlip | Returns msoTrue if the specified shape has been flipped around its horizontal axis. Read-only MsoTriState. | |
Hyperlink | Returns a Hyperlink object representing the hyperlink associated with the specified shape. | |
ID | Returns a Long that represents the type of a shape, range of shapes, or property, type, or value of a wizard. Read-only. | |
InlineAlignment | Returns or sets a PbInlineAlignment constant that indicates whether an inline shape has left, right, or in-text alignment. Read/write. | |
InlineTextRange | Returns a TextRange object that reflects the position of the inline shape in its containing text range. Read-only. | |
IsInline | Returns an MsoTriState constant that specifies whether a shape is inline. Read-only. | |
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. | |
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.) | |
LinkFormat | Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only. | |
LockAspectRatio | Returns or sets an MsoTriState constant indicating whether the specified shape retains its original proportions when you resize it. Read/write. | |
Name | Returns or sets a String value indicating the name of the specified object. Read/write. | |
Nodes | Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape or ShapeRange objects that represent freeform drawings. | |
OLEFormat | Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. | |
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. | |
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. | |
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. | |
Shadow | Returns a ShadowFormat object that represents the shadow formatting for the specified shape. | |
Table | Returns a Table object that represents a table in Microsoft Publisher. | |
Tags | Returns a Tags collection representing tags or custom properties applied to a shape, shape range, page, or publication. | |
TextEffect | Returns a TextEffectFormat object that represents the text formatting properties of a WordArt object. | |
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. | |
TextWrap | Returns a WrapFormat object that represents the properties for wrapping text around a shape or shape range. | |
ThreeD | Returns a ThreeDFormat object. | |
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. | |
Type | Returns a PbShapeType constant that represents the shape type. Read-only. | |
VerticalFlip | Returns msoTrue if the specified shape has been flipped around its vertical axis. Read-only MsoTriState. | |
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. | |
Width | Returns a Variant that represents the width (in points) of a specified range of shapes. Read-only. | |
Wizard | Returns a Wizard object representing the publication design associated with the specified publication or the wizard associated with the specified Design Gallery object. | |
WizardTag | Returns or sets a PbWizardTag constant indicating the function of a specified shape with respect to its publication design. Read/write. | |
WizardTagInstance | Returns or sets a Long indicating the instance of the specified shape compared with other shapes having the same wizard tag. Read/write. | |
ZOrderPosition | Returns a Long indicating the position of the specified shape or shape range in the z-order. Read-only. |