Share via


Cut Method [Visio 2003 SDK Documentation]

As it applies to the Characters object.

Deletes a text range and places it on the Clipboard.

object**.Cut**

object     Required. An expression that returns a Characters object.

Version added

2.0

Remarks

When used with a Characters object, the Cut method places the text range represented by that object onto the Clipboard.

As it applies to the Selection and Shape objects.

Deletes an object or selection and places it on the Clipboard.

object**.Cut** [flags]

object     Required. An expression that returns a Selection or Shape object.

flags     Optional Variant. Determines how shapes are translated during the cut operation.

Version added

2002

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

As it applies to the Shape object.

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).

Public Sub Cut_Example()
  
    Dim vsoShape As Visio.Shape 

    Set vsoShape = ActivePage.DrawRectangle(1, 5, 5, 1) 

    'Cut shape from the page 
    vsoShape.Cut 

End Sub  

Applies to | Characters object | Selection object | Shape object

See Also | Copy method | Paste method