To reference a document by its name
If you want to refer to the active document (the document that has focus), you can use the ActiveDocument property of the Application object.
To reference the active document
If you are only working with the document that is associated with a document-level customization, you can use the Globals.ThisDocument reference from anywhere in the project when you need to refer to the document that has the focus.
To reference the document associated with a document-level customization