API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.DataFields property
Returns the DataFields collection, which represents a list of all Object data fields defined within the document
Syntax:
Property Get DataFields() As DataFields
Remarks:
The DataFields property returns the DataFields collection, which represents a list of all object data fields defined in the document. By default, CorelDRAW create four data fields: Name, Cost, Comments, and CDRStaticID. The Cost and Comments fields are for your convenience and can be edited or deleted as required. The Name and CDRStaticID fields are used by CorelDRAW to identify objects and cannot be edited or deleted.
Examples:
The following VBA example counts the number of data fields defined in the active document.
Sub Test()
Dim n As Long
n = ActiveDocument.DataFields.Count
MsgBox "There are " & n & " data fields defined" 
End Sub