Partager via


DocumentBase.ActiveWindow Property

Gets a Window that represents the active window.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property ActiveWindow As Window
public Window ActiveWindow { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Window
A Window that represents the active window.

Remarks

The active window is the window that currently has focus.

If there are no windows open, an exception is thrown.

Examples

The following code example splits the active window. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentActiveWindow()
        Me.ActiveWindow.Split = True 
    End Sub
private void DocumentActiveWindow()
{
    this.ActiveWindow.Split = true;
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace