GoToPrevious Method

Applies To

MailMessage object, Range object, Selection object.

Description

Range or Selection object: Returns a Range object that refers to the start position of the previous item or location specified by the What argument. If applied to a Selection object, GoToPrevious moves the selection to the specified item.

MailMessage object: Displays the previous mail message if WordMail is available.

Syntax 1

expression.GoToPrevious(What)

Syntax 2

expression.GoToPrevious

expression Required. An expression that returns a Range or Selection object (Syntax 1) or a MailMessage object (Syntax 2).

What Required Long. The item that the specified range or selection is to be moved to. Can be one of the following WdGoToItem constants: wdGoToBookmark, wdGoToComment, wdGoToEndnote, wdGoToEquation, wdGoToField, wdGoToFootnote, wdGoToGrammaticalError, wdGoToGraphic, wdGoToHeading, wdGoToLine, wdGoToObject, wdGoToPage, wdGoToPercent, wdGoToProofreadingError, wdGoToSection, wdGoToSpellingError, or wdGoToTable.

See Also

GoTo method, GoToNext method, PreviousField method, PreviousSubdocument method, Target property.

Example

This example moves to the previous field in the active document.

Selection.GoToPrevious What:=wdGoToField
This example creates a range that references the last footnote reference marker in the active document.

Set myRange = ActiveDocument.Words.Last.GoToPrevious(What:=wdGoToFootnote)
myRange.Expand Unit:=wdCharacter