Share via


Paste Method [Publisher 2003 VBA Language Reference]

Paste method as it applies to the Shapes object.

Pastes the shapes or text on the Clipboard into the specified Shapes collection, at the top of the z-order. Each pasted object becomes a member of the specified Shapes collection. If the Clipboard contains a text range, the text will be pasted into a newly created TextFrame shape. Returns a ShapeRange object that represents the pasted objects.

expression.Paste

expression Required. An expression that returns a Shapes collection.

Paste method as it applies to the TextRange object.

Pastes the text on the Clipboard into the specified text range, and returns a TextRange object that represents the pasted text.

expression.Paste

expression Required. An expression that returns a TextRange object.

Example

As it applies to the Shapes object.

This example copies shape one on page one in the active publication to the Clipboard and then pastes it into page two.

With ActiveDocument
    .Pages(1).Shapes(1).Copy
    .Pages(2).Shapes.Paste
End With

As it applies to the TextRange object.

This example cuts the text in shape one on page one in the active publication, places it on the Clipboard, and then pastes it after the first word in shape two on the same page. This example assumes that each shape contains text.

With ActiveDocument.Pages(1)
    .Shapes(1).TextFrame.TextRange.Cut
    .Shapes(2).TextFrame.TextRange. _
        Words(1).Paste
End With

Applies to | Shapes Collection | TextRange Object