API Documentation > CorelDRAW > 2025-v26 > Documents > IVGDocuments
Documents.Count property
Gets the number of items in the collection of documents
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of open documents in CorelDRAW.
Examples:
The following VBA example displays the number of documents currently open.
Sub Test()
Select Case Documents.Count
  Case 0

 MsgBox "There are no documents open"
  Case 1

 MsgBox "There is 1 document open"
  Case Else

 MsgBox "There are " & Documents.Count & " documents open"
End Select 
End Sub