ExtendMode Property Example

This example moves the selection to the beginning of the active line and then extends the selection down two lines. The example applies italic formatting to the selection and cancels extend selection mode.

With Selection
    .Collapse Direction:=wdCollapseStart
    .HomeKey Unit:=wdLine, Extend:=wdMove
    .ExtendMode = True
    .MoveDown Unit:=wdLine, Count:=2
    .Font.Italic = True
    .ExtendMode = False
End With

This example selects all text in the selection from the insertion point through the bookmark named "Temp."

With Selection
    .Collapse Direction:=wdCollapseStart
    .ExtendMode = True
    Selection.GoTo What:=wdGoToBookmark, Name:="temp"
    .ExtendMode = False
End With