Next Method

Applies To

Browser object, Paragraph object, Range object, Selection object.

Description

Syntax 1: For the Browser object, moves the selection to the next item indicated by the browser target. Use the Target property to change the browser target.

Syntax 2: Returns the next paragraph as a Paragraph object.

Syntax 3: Returns a Range object relative to the specified selection or range.

Note If the Range or Selection is just before the specified Unit the Range or Selection is moved to the following unit. For example, if the Selection is just before a word, the following instruction moves the Selection forward to the following word.

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

expression.Next

Syntax 2

expression.Next(Count)

Syntax 3

expression.Next(Unit, Count)

expression Syntax 1: An expression that returns a Browser object.

Syntax 2: An expression that returns a Paragraph object.

Syntax 3: An expression that returns a Range or Selection object.

Unit Optional Variant. Can be one of the following WdUnits constants: wdCharacter, wdWord, wdSentence, wdParagraph, wdSection, wdStory, wdCell, wdColumn, wdRow, or wdTable. If expression returns a Selection object, wdLine can also be used. The default value is wdCharacter.

Count Optional Long. The number of paragraphs (Syntax 2) or units (Syntax 3) by which you want to move ahead. The default value is 1.

See Also

Expand method, NextField method, NextSubdocument method, Previous method, Target property.

Example

This example moves the insertion point just before the next comment reference marker in the active document.

With Application.Browser
    .Target = wdBrowseComment
    .Next
End With
This example inserts a number and a tab before the first nine paragraphs in the active document.

For n = 0 To 8
    Set myRange = ActiveDocument.Paragraphs(1).Next(Count:=n).Range
    myRange.Collapse Direction:=wdCollapseStart
    myRange.InsertAfter n + 1 & vbTab
Next n
This example selects the paragraph following the current selection.

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