Document.CodeName (Word)

Returns the code name for the specified document.

The code name is the name for the module that houses event macros for a document. The default name for the module is "ThisDocument"; you can view it in the Project window. For information about using events with the Document object, see Using events with the Document object.


Msgbox ActiveDocument.CodeName