Flags Property

Applies To

Selection object.

Description

Returns or sets properties of the selection. Can be set to one of the following WdSelectionFlags constants: wdSelActive, wdSelAtEOL, wdSelOvertype, wdSelReplace, or wdSelStartActive. The return value of the Flags property is the sum of the WdSelectionFlags constants that apply to the selection. Read/write Long.

Note The wdSelAtEOL constant is functionally equivalent to the IPAtEndOfLine property.

See Also

Active property, Information property, IPAtEndOfLine property, Overtype property, ReplaceSelection property, StartIsActive property.

Example

This example selects the first word in the active document. The first message box displays "False" because the end of the selection is active. The Flags property makes the beginning of the selection active, and the second message box displays "True."

ActiveDocument.Words(1).Select
MsgBox Selection.StartIsActive
Selection.Flags = wdSelStartActive
MsgBox Selection.StartIsActive
This example turns on overtype mode for the selection.

Selection.Flags = wdSelOvertype