Document.VBProject (Word)

Returns the VBProject object for the specified template or document.

Use this property to gain access to code modules and user forms. To view the VBProject object in the object browser, you must select the Microsoft Visual Basic for Applications Extensibility check box in the References dialog box (Tools menu) in the Visual Basic Editor.


Set currProj = ActiveDocument.VBProject 
MsgBox currProj.Name