API Documentation > CorelDRAW > 2025-v26 > DataItems > IVGDataItems
DataItems.CopyFrom method
Copies DataItems from a Shape
Syntax:
Sub CopyFrom(ByVal Shape As Shape)
Parameters:
Name Type Description
Shape
Remarks:
The CopyFrom method copies the data fields and values from a shape 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.
Examples:
The following VBA 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