NextSubdocument Method

Applies To

Range object, Selection object.

Description

Moves the range or selection to the next subdocument. If there isn't another subdocument, an error occurs.

Syntax

expression.NextSubdocument

expression   An expression that returns a Range or Selection object.

See Also

GoToNext method, Next method, Next property, PreviousSubdocument method.

Example

This example switches the active document to master document view and selects the first subdocument.

If ActiveDocument.Subdocuments.Count >= 1 Then
    ActiveWindow.View.Type = wdMasterView
    Selection.HomeKey unit:=wdStory, Extend:=wdMove
    Selection.NextSubdocument
End If