Previous Method
Applies To
Browser object, Paragraph object, Range object, Selection object.
Description
Syntax 1: For the Browser object, moves the selection to the previous item indicated by the browser target. Use the Target property to change the browser target.
Syntax 2: Returns the previous 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 after the specified Unit the Range or Selection is moved to the previous unit. For example, if the Selection is just after a word (before the trailing space), the following instruction moves the Selection backwards to the previous word.
Selection.Previous(Unit:=wdWord, Count:=1).Select
Syntax 1
expression.Previous
Syntax 2
expression.Previous(Count)
Syntax 3
expression.Previous(Unit, Count)
expression Syntax 1: Required. An expression that returns a Browser object.
Syntax 2: Required. An expression that returns a Paragraph object.
Syntax 3: Required. 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 Variant. The number of paragraphs (Syntax 2) or units (Syntax 3) by which you want to move back. The default value is 1.
See Also
Next method, NextField method, PreviousField method, Target property.
Example
This example moves the insertion point into the first cell (the cell in the upper-left corner) of the previous table.
With Application.Browser
.Target = wdBrowseTable
.Previous
End With
This example selects the paragraph that precedes the selection in the active document.
Selection.Previous(Unit:=wdParagraph, Count:=1).Select
This example applies bold formatting to the first word in the active document.
ActiveDocument.Words(2).Previous(Unit:=wdWord, Count:=1).Bold = True