选定内容。 Paste 方法 (Word)Selection.Paste method (Word)

将“剪贴板”的内容插入指定的选择范围处。Inserts the contents of the Clipboard at the specified selection.

语法Syntax

表达式粘贴expression.Paste

expression:必需。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

备注Remarks

使用此方法替换当前选择范围的内容。Using this method replaces the contents of the current selection. 如果不想替换选定内容的内容, 请在使用此方法之前使用**Collapse** 方法。If you don't want to replace the contents of the selection, use the Collapse method before using this method.

将此方法与Range对象一起使用时, 该范围将扩展, 以包含剪贴板中的内容。When you use this method with a Range object, the range expands to include the contents of the Clipboard. 如果您使用刺带 Selection 对象的方法,所选内容不会扩展到包含“剪贴板”中的内容;相反,所选内容将放置到粘贴的“剪贴板”内容之后。When you use this method with a Selection object, the selection does not expand to include the Clipboard contents; instead, the selection is positioned after the pasted Clipboard contents.

示例Example

以下示例复制文档中的第一段并将其粘贴到插入点。This example copies the first paragraph in the document and pastes it at the insertion point.

ActiveDocument.Paragraphs(1).Range.Copy 
Selection.Collapse Direction:=wdCollapseStart 
Selection.Paste

另请参阅See also

Selection 对象Selection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.