API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.Index property
Returns the index of the document in the Documents collection
Syntax:
Property Get Index() As Long
Remarks:
The Index property returns the index value associated with a document in the Documents collection. The first document that was opened has the index value of 1.
Examples:
The following VBA example activates the first document that was opened if it is not the active document.
Sub Test()
If ActiveDocument.Index <> 1 Then Documents(1).Activate

End Sub