Caption Property

Applies To

Application object, DocumentWindow object.

Description

Application object: Returns the text that appears in the title bar of the application window. Read/write String.

DocumentWindow object: Returns the text that appears in the title bar of the document window. Read-only String.

Example

This example displays the caption for each open document window.

With Application.Windows
    For w = 1 To .Count
        MsgBox "Window " & w & " contains " & .Item(1).Caption
    Next
End With