Previous Document Next Document

Object Model Reference : Classes : D : DataItems : Methods : DataItems.CopyFrom


DataItems.CopyFrom

Sub CopyFrom(Shape As Shape)

Description

Member of DataItems

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.

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

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.