Selection.MoveUp(Object, Object, Object) Selection.MoveUp(Object, Object, Object) Method


Moves the selection up and returns the number of units it's been moved.

public int MoveUp (ref object Unit, ref object Count, ref object Extend);
Public Function MoveUp (Optional ByRef Unit As Object, Optional ByRef Count As Object, Optional ByRef Extend As Object) As Integer
Object Object

Optional Object. The unit by which to move the selection. Can be one of the following WdUnits constants: wdLine, wdParagraph, wdWindow or wdScreen. The default value is wdLine.

Object Object

Optional Object. The number of units the selection is to be moved. The default value is 1.

Object Object

Optional Object. Can be either wdMove or wdExtend. If wdMove is used, the selection is collapsed to the end point and moved up. If wdExtend is used, the selection is extended up. The default value is wdMove.



The wdWindow constant can be used to move to the top or bottom of the active window. Regardless of the value of Count (greater than 1 or less than – 1), the wdWindow constant moves only one unit. Use the wdScreen constant to move more than one screen.

Applies to