Previous Document Next Document
Layer.Paste

Function Paste() As Shape

Member of Layer

The Paste method places the contents in the system Clipboard on a layer.

The following code 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 2007 Corel Corporation. All rights reserved.