Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.Paste Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Pastes the contents of the Clipboard into an object.

Syntax

expression . Paste( Flags )

expression A variable that represents a Shape object.

Parameters

NameRequired/OptionalData TypeDescription
FlagsOptionalVariantDetermines how shapes are translated during the paste operation.

Return Value

Nothing

Remarks

The Paste method works only with Shape objects that are group shapes. Use the Type property of a shape to determine whether it is a group.

Possible values for Flags are declared by the Visio type library in VisCutCopyPasteCodes , and are described in the following table.

FlagValueDescription
visCopyPasteNormal&;H0Follow default copying behavior.
visCopyPasteNoTranslate&;H1Copy shapes to their original coordinate locations.
visCopyPasteCenter&;H2Copy shapes to the center of the page.
visCopyPasteNoHealConnectors&;H4Do not clean up connectors attached to cut shapes.
visCopyPasteNoContainerMembers&;H8Do not cut and copy unselected members of containers or lists.
visCopyPasteNoAssociatedCallouts&;H16Do not cut and copy unselected callouts associated with shapes.
visCopyPasteDontAddToContainers&;H32Do not add pasted shapes to any underlying containers.
visCopyPasteNoCascade&;H64Do not offset shapes on copy.

Setting Flags to visCopyPasteNormal is the equivalent of the behavior in the user interface. You should use visCopyPasteNormal and the other flags consistently. For example, if you use the value visCopyPasteNoTranslate to copy, you should also use that value to paste, because that is the only way to ensure that shapes are pasted to their original coordinate location.

If you need to control the format of the pasted information and (optionally) establish a link to a source file (for example, a Microsoft Word document), use the PasteSpecial method.

© 2017 Microsoft