API Documentation > CorelDRAW > 2025-v26 > DataFields > IVGDataFields
DataFields.Count property
Gets the number of items in the collection of DataFields
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of data-field objects available.
Examples:
The following VBA example shows the number of data fields available.
Sub Test()
Dim n As Long
n = ActiveDocument.DataFields.Count
MsgBox "There are " & n & " data fields defined." 
End Sub