Before you can use document level events in VB or another environment besides VBA, you must create a new class module and declare an object of type AcadDocument with events.
For example, assume a new class module is created and called EventClassModule. The new class module contains the declaration of the application with the VBA keyword WithEvents.