Partager via


Shapes.Paste Method

Pastes the shapes, slides, 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 entire slides, the slides will be pasted as shapes that contain the images of the slides. 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.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function Paste As ShapeRange
'Usage
Dim instance As Shapes
Dim returnValue As ShapeRange

returnValue = instance.Paste()
ShapeRange Paste()

Return Value

Type: Microsoft.Office.Interop.PowerPoint.ShapeRange

Remarks

Use the ViewType property to set the view for a window before pasting the Clipboard contents into it. The following table shows what you can paste into each view.

Into this view

You can paste the following from the Clipboard

Slide view or notes page view

Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is selected, the pasted text will replace the selection; if anything else is selected, the pasted text will be placed in it is own text frame. Pasted shapes will be added to the top of the z-order and will not replace selected shapes.

Outline view

Text or entire slides. You cannot paste shapes into outline view. A pasted slide will be inserted before the slide that contains the cursor.

Slide sorter view

Entire slides. You cannot paste shapes or text into slide sorter view. A pasted slide will be inserted at the cursor or after the last slide selected in the presentation.

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.PowerPoint Namespace