PreviousSubdocument Method

Applies To

Range object, Selection object.

Description

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

Syntax

expression.PreviousSubdocument

expression   An expression that returns a Range or Selection object.

See Also

GoToPrevious method, NextSubdocument method.

Example

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

If ActiveDocument.Subdocuments.Count >= 1 Then
    ActiveWindow.View.Type = wdMasterView
    Selection.EndKey Unit:=wdStory, Extend:=wdMove
    Selection.PreviousSubdocument
End If