Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.Paste


Layer.Paste

Function Paste() As Shape

Description

Member of Layer

The Paste method places the Clipboard contents on a layer.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.