Selection Methods (Visio)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Name

Description

AddToContainers

Adds the selection of shapes to all underlying containers that allow it as a member.

AddToGroup

Adds the selected shapes to the selected group.

Align

Aligns two or more selected shapes.

AutomaticLink

Links selected shapes to data rows in the specified data recordset automatically, without requiring you to specify the exact correspondence of all shapes and data rows. Returns the number of shapes linked.

AvoidPageBreaks

Makes small adjustments to selected shapes to move them off page breaks.

BoundingBox

Returns a rectangle that tightly encloses the shapes of a selection.

BreakLinkToData

Breaks links between all shapes in the selection and data rows in the specified data recordset.

BringForward

Brings the shape or selected shapes forward one position in the z-order.

BringToFront

Brings the shape or selected shapes to the front of the z-order.

Combine

Creates a new shape by combining selected shapes.

ConnectShapes

Connects two or more selected shapes with a dynamic connector. ReturnsNothing.

ConvertToGroup

Converts a selection or an object from another application (a linked or embedded object) to a group.

Copy

Copies a selection to the Clipboard.

Cut

Deletes a selection and places it on the Clipboard.

Delete

Deletes an object or selection.

DeleteEx

Deletes additional shapes associated with the selection, such as connectors and unselected container members, when the selection is deleted.

DeselectAll

Deselects all shapes in a window or selection.

Distribute

Distributes three or more selected shapes at regular intervals on the drawing page. The order of selection is irrelevant.

DrawRegion

Draws a new shape that represents the region containing a given point.

Duplicate

Duplicates a selection.

Export

Exports an object from Microsoft Visio to a file format such as .bmp, .dib, .dwg, .dxf, .emf, .emz, .gif, .htm, .jpg, .png, .svg, .svgz, .tif, or .wmf.

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.

Flip

Flips selected shapes either as a group or individually about their pins. Returns Nothing.

FlipHorizontal

Flips an object horizontally.

FlipVertical

Flips an object vertically.

Fragment

Breaks selected shapes into smaller shapes.

GetCallouts

Returns the list of identifiers of the callout shapes in the selection.

GetContainers

Returns an array of shape identifiers (IDs) of the container shapes in the selection.

GetIDs

Gets the shape IDs of the shapes in the selection.

Group

Groups the objects that are selected in a selection, or it converts a shape into a group.

Intersect

Creates one closed shape from the area in which selected shapes overlap or intersect.

Join

Creates a new shape by joining selected shapes.

Layout

Lays out the shapes and/or reroutes the connectors for the page, master, group, or selection.

LayoutChangeDirection

Revises the layout of a selection of connected shapes by rotating or flipping the connected shapes as a unit, without rotating or flipping the individual shapes.

LayoutIncremental

Makes small adjustments to the position of shapes in the selection to better align the shapes or to space them evenly from other shapes.

LinkToData

Links a selection of shapes to a single data row in a data recordset.

MemberOfContainersIntersection

Returns an array of identifiers of the shapes that belong to the normal or list containers that contain all the shapes in the selection.

MemberOfContainersUnion

Returns an array of identifiers of the shapes that belong to the normal or list containers that contain at least one of the shapes in the selection.

Move

Moves a selection a specified distance.

MoveToSubprocess

Moves the selection to the specified page, and drops a replacement shape on the source page and links it to the target page. Returns the selection of moved shapes on the target page.

Offset

Offsets a selection a specified amount.

RemoveFromContainers

Removes the selection of shapes from all lists and containers of which the selection is a member.

RemoveFromGroup

Removes selected shapes from a group.

ReplaceShape

Replaces the specified selection with one or more instances of the master passed as the first parameter, and returns an array containing the new shape or shapes.

Resize

Resizes the selection by moving shape handles as specified.

ReverseEnds

Reverses an object by flipping it both horizontally and vertically.

Rotate

Rotates selected shapes either as a group or individually about their pins.

Rotate90

Rotates an object 90 degrees counterclockwise.

Select

Selects or clears the selection of an object.

SelectAll

Selects all possible shapes in a window or selection.

SendBackward

Moves a shape or selected shapes back one position in the z-order.

SendToBack

Moves the shape or selected shapes to the back of the z-order.

SetContainerFormat

Changes the formatting of one aspect of all the containers in the selection, and returns an array of identifiers of shapes that belong to the containers and whose formatting was changed.

SetQuickStyle

Sets the quick style of the specified selection.

Subtract

Subtracts the areas that overlap the selected shape.

SwapEnds

Swaps the begin and endpoints of a one-dimensional (1-D) shape.

Trim

Trims selected shapes into smaller shapes.

Ungroup

Ungroups a group.

Union

Creates a new shape from the perimeter of selected shapes.

UpdateAlignmentBox

Updates the alignment box for a shape.

VisualBoundingBox

Returns the bounding rectangle of the virtual container that has all the shapes of the given selection.

Show: