Share via


MoveDown Method Example

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This example extends the selection down one line.

  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.

  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.

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