API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.ApplyToDuplicate property
Lets you specify whether to create duplicates of objects while transforming them. This property is used mainly for user interface compatibility and recording. Some commands may result in several duplicates and some may produce none. There is no way of referenc
Syntax:
Property Get ApplyToDuplicate() As Boolean
Property Let ApplyToDuplicate(ByVal Value As Boolean)
Remarks:
The ApplyToDuplicate property lets you specify whether to create duplicates of objects while transforming them. The ApplyToDuplicate property is used mainly for user interface compatibility and recording. Some commands may result in several duplicates and some may produce none. There is no way of referencing the duplicated shape; therefore, it is recommended that you use the Shape.Duplicate method to create duplicates of shapes. (This method works almost as quickly.) It is important to note that the ApplyToDuplicate property affects the global state of the document. Changing this property may affect other script execution. You should always restore the state of ApplyToDuplicate after using it.
Examples:
The following VBA example creates an ellipse and then moves it by one inch horizontally after creating a copy of it:
Sub Test()
Dim d As Document
Dim s As Shape
Dim b As Boolean
Set d = ActiveDocument
Set s = ActiveLayer.CreateEllipse2(4, 4, 2)
b = d.ApplyToDuplicate ' store previous state
d.ApplyToDuplicate = True
s.Move 1, 0
d.ApplyToDuplicate = b ' restore state 
End Sub