API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.Properties property
Returns any custom properties that were saved with the document
Syntax:
Property Get Properties() As Properties
Remarks:
The Properties property returns a Properties object that is used to store any custom data with the document. The data is saved in the CorelDRAW file and retrieved the next time the document is opened. Because the data is persistent, you can use it to store global macro settings in the document. The data is available for VBA macros only and is not accessible in any way from the user interface of CorelDRAW.
Examples:
The following VBA example creates three different custom property records in the current document and then retrieves their values. The values are saved along with the document and be available in the next session unless you delete them by using the Properties.Delete or Properties.DeleteByIndex methods.
Sub Test()
Const MyMacroName As String = "MyTestMacro"
With ActiveDocument
  .Properties(MyMacroName, 1) = "My String 1" ' String
  .Properties(MyMacroName, 2) = 1 ' Integer
  .Properties(MyMacroName, 3) = Atn(1) * 4 ' Double
  MsgBox .Properties(MyMacroName, 1)
  MsgBox .Properties(MyMacroName, 2)
  MsgBox .Properties(MyMacroName, 3)
End With 
End Sub