CodeName Property

Applies To

Document object.

Description

Returns the code name for the specified document. Read-only String.

Remarks

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.

Example

This example returns the name of the code window for the active document.

Msgbox ActiveDocument.CodeName