Object Model Reference : Classes : L : Layer : Methods : Layer.Paste |
Function Paste() As Shape
Member of Layer
The Paste method places the Clipboard contents on a layer.
The following VBA example copies the shapes from the current page to the Clipboard, adds three empty pages to the end of the document, and pastes the objects on the active layer of each new page.
Sub Test() |
Dim p As Page |
Dim i As Long, idx As Long |
ActivePage.Shapes.All.Copy |
Set p = ActiveDocument.AddPages(3) |
idx = p.Index |
For i = idx To ActiveDocument.Pages.Count |
Set p = ActiveDocument.Pages(i) |
p.Activate |
p.ActiveLayer.Paste |
Next i |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.