Range.Next Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns a Range object that represents the specified unit relative to the specified range.

expression .Next(Unit, Count)

expression Required. A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

Unit

Optional

Variant

The type of units by which to count. Can be any WdUnits constant.

Count

Optional

Variant

The number of units by which you want to move ahead. The default value is one.

Return Value

Range

If the range is just before the specified Unit, the range is moved to the following unit. For example, if the range is just before a word, the following instruction moves the selected text forward to the following word.

Selection.Range.Next(Unit:=wdWord, Count:=1).Select

Concepts

Other resources

Show: