This documentation is archived and is not being maintained.

Selection.MoveDown Method

Office 2007
Moves the selection down and returns the number of units it has been moved.


expression.MoveDown(Unit, Count, Extend)

expression   Required. A variable that represents a Selection object.


NameRequired/OptionalData TypeDescription
UnitOptionalWdUnitsThe unit by which the selection is to be moved.The default value is wdLine.
CountOptionalVariantThe number of units the selection is to be moved. The default value is 1.
ExtendOptionalVariantCan be either wdMove or wdExtend. If wdMove is used, the selection is collapsed to the endpoint and moved down. If wdExtend is used, the selection is extended down. The default value is wdMove.


This example extends the selection down one line.

Visual Basic for Applications
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend

This example moves the selection down three paragraphs. If the move is successful, "Company" is inserted at the insertion point.

Visual Basic for Applications
unitsMoved = Selection.MoveDown(Unit:=wdParagraph, _
    Count:=3, Extend:=wdMove)
If unitsMoved = 3 Then Selection.Text = "Company"

This example displays the current line number, moves the selection down three lines, and displays the current line number again.

Visual Basic for Applications
MsgBox "Line " & Selection.Information(wdFirstCharacterLineNumber)
Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdMove
MsgBox "Line " & Selection.Information(wdFirstCharacterLineNumber)