ActiveDocument property example

This example shows how to return the name of the active document.

Private Sub ActiveDocPropExample()

     Dim activeDoc As Document

     Set activeDoc = Application.ActiveDocument

     MsgBox "The active document is: " & activeDoc.Name, vbInformation, "ActiveDocument Example"

End Sub