Previous Document Next Document

Understanding the CorelDRAW object model : Working with shapes : Duplicating shapes


Duplicating shapes

You can use the Shape.Duplicate method to duplicate a shape, and you can use the ShapeRange.Duplicate method to duplicate a range of shapes.

ActiveSelection.Duplicate

The Duplicate method provides two optional parameters, OffsetX and OffsetY, which offset the duplicate from the original (horizontally and vertically, respectively). The following VBA code positions the duplicate two inches to the right and one inch above the original:

ActiveDocument.Unit = cdrInch
ActiveSelection.Duplicate 2, 1

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.