Shape.Cut Method
Visio Automation Reference |
Deletes an object or selection and places it on the Clipboard.
Version Information
Version Added: Visio 2002
Syntax
expression.Cut(Flags)
expression A variable that represents a Shape object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Flags | Optional | Variant | Determines how shapes are translated during the cut operation. |
Return Value
Nothing
Remarks
Possible values for Flags are declared by the Visio type library in VisCutCopyPasteCodes, and are described in the following table.
Flag | Value | Description |
---|---|---|
visCopyPasteNormal |
&H0 |
Default. Shapes are copied to the center of the document. |
visCopyPasteNoTranslate |
&H1 |
Shapes are copied to their original coordinate locations. |
Setting Flags to visCopyPasteNormal is the equivalent of the behavior in the user interface. Use the visCopyPasteNormal and visCopyPasteNoTranslate flags consistently. For example, if you use 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.
Example
The following example shows how to use the Cut method. It draws a rectangle and then cuts it from the page (and places it on the Clipboard).
Visual Basic for Applications |
---|
|
See Also