Share via


TextRange.Paste Method

Publisher Developer ReferencePublisher Developer Reference

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

Syntax

expression.Paste

expression   A variable that represents a TextRange object.

Return Value
TextRange

Example

This example deletes 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.

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

See Also