API Documentation > CorelDRAW > 2025-v26 > Layer > IVGLayer
Layer.CreateOLEObject method
Creates a new OLE object
Syntax:
Function CreateOLEObject(ByVal ObjectID As String, Optional ByVal DisplayAsIcon As Boolean = False, Optional ByVal Caption As String, Optional ByVal Icon As Variant) As Shape
Parameters:
Name Type Description
ObjectID
String
DisplayAsIcon
Boolean
Specifies whether to display the OLE object as an icon.
Caption
String
Icon
Variant
Remarks:
The CreateOLEObject method creates a new OLE object on a layer.