Share via


Window2.Caption Property

Gets or sets the caption text for the window represented by the WindowObject object.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Property Caption As String
    Get
    Set
'Usage
Dim instance As Window2
Dim value As String

value = instance.Caption

instance.Caption = value
string Caption { get; set; }

Property Value

Type: System.String

Remarks

The caption text that is returned or set by this property corresponds to the text preceding "- Microsoft InfoPath 2010" on the title bar of the window

Examples

In the following example, the Caption property is used to set the caption text of the active window.

string caption = "mycaption";
thisApplication.ActiveWindow.Caption = caption;

See Also

Reference

Window2 Interface

Window2 Members

Microsoft.Office.Interop.InfoPath Namespace