Object Model Reference : Classes : S : Shape : Methods : Shape.Copy |
Sub Copy()
Member of Shape
The Copy method copies a shape to the Clipboard.
The following VBA example copies each shape from the active page to a separate page in a new document.
Sub Test() |
Dim s As Shape, bAddPage As Boolean |
Dim doc1 As Document, doc2 As Document |
Set doc1 = ActiveDocument |
Set doc2 = CreateDocument() |
bAddPage = False |
For Each s In doc1.ActivePage.Shapes() |
s.Copy |
If bAddPage Then doc2.AddPages 1 |
doc2.ActiveLayer.Paste |
bAddPage = True |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.