Active Property

Applies To

LineNumbering object, Selection object, Window object.

Description

LineNumbering object: True if line numbering is active for the specified document, section, or sections. Can be True, False, or wdUndefined. Read/write Long.

Selection object: True if the selection in the specified window or pane is active. Read-only Boolean.

Window object: True if the specified window is active. Read-only Boolean.

See Also

Activate method, ActiveWindow property, LineNumbering property, Selection property.

Example

This example activates the first window in the Windows collection, if the window isn't currently active.

If Windows(1).Active = False Then Windows(1).Activate
This example activates line numbering for the first section in the selection.

With Selection.Sections(1).PageSetup.LineNumbering
    .Active = True
    .CountBy = 5
    .StartingNumber = 1
End With
This example splits the active window into two panes and activates the selection in the first pane, if it isn't already active.

ActiveWindow.Split = True
If ActiveWindow.Panes(1).Selection.Active = False Then
    ActiveWindow.Panes(1).Activate
End If