Copy Method

Applies To

Bookmark object, Field object, FormField object, Frame object, MailMergeField object, PageNumber object, Range object, Selection object.

Description

Syntax 1: Copies the specified object to the Clipboard.

Syntax 2: Sets the bookmark specified by the Name argument to the location marked by another bookmark, and returns a Bookmark object.

Syntax 1

expression.Copy

Syntax 2

expression.Copy(Name)

expression Syntax 1: Required. An expression that returns a Field, FormField, Frame, MailMergeField, PageNumber, Range, or Selection object.

Syntax 2: Required. An expression that returns a Bookmark object.

Name Required String. The name of the new bookmark.

See Also

CopyAsPicture method, CopyFormat method, Cut method, Paste method, PasteSpecial method.

Example

This example copies the contents of the selection into a new document.

If Selection.Type = wdSelectionNormal Then
    Selection.Copy
    Documents.Add.Content.Paste
End If
This example sets the Book2 bookmark to the location marked by the Book1 bookmark.

ActiveDocument.Bookmarks("Book1").Copy Name:="Book2"
This example sets the Selection bookmark to the \Sel predefined bookmark in the active document.

ActiveDocument.Bookmarks("\Sel").Copy Name:="Selection"
This example copies the first paragraph in the active document and pastes it at the end of the document.

ActiveDocument.Paragraphs(1).Range.Copy
Set myRange = ActiveDocument.Range(Start:=ActiveDocument.Content.End - 1, _
    End:=ActiveDocument.Content.End - 1)
myRange.Paste
This example copies the comments in the active document to the Clipboard.

If ActiveDocument.Comments.Count >= 1 Then
    ActiveDocument.StoryRanges(wdCommentsStory).Copy
End If