Previous Document Next Document
DataItems.CopyFrom

Sub CopyFrom(Shape As Shape)

Member of DataItems

The CopyFrom method copies the data fields and values from a shape (data item) and copies them into another shape. A data item stores information about a shape object within the CorelDRAW development environment.

The CopyFrom method does not copy values from the CDRStaticID and Name fields.

Parameters
Description
Shape
Identifies the shape object whose data fields and values are copied and placed into another data item object

The following code example copies object data from the currently selected shape to the newly created ellipse.

Sub Test() 
 Dim s1 As Shape, s2 As Shape 
 Set s1 = ActiveShape 
 Set s2 = ActiveLayer.CreateEllipse2(4, 5, 3) 
 s2.ObjectData.CopyFrom s1 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.