Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.Copy


Shape.Copy

Sub Copy()

Description

Member of Shape

The Copy method copies a shape to the Clipboard.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.