Skip to content

Latest commit

 

History

History
63 lines (35 loc) · 1.13 KB

Word.Selection.PreviousField.md

File metadata and controls

63 lines (35 loc) · 1.13 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.PreviousField method (Word)
vbawd10.chm158662833
vbawd10.chm158662833
Word.Selection.PreviousField
9361a318-9ee2-fd72-9d52-106abfd8d44e
06/08/2017
medium

Selection.PreviousField method (Word)

Selects and returns the previous field.

Syntax

expression. PreviousField

expression Required. A variable that represents a Selection object.

Return value

Field

Remarks

If this method finds a field, it returns a Field object; if not, it returns Nothing.

Example

This example updates the previous field (the field immediately preceding the selection).

If Not (Selection.PreviousField Is Nothing) Then 
 Selection.Fields.Update 
End If

This example selects the previous field, and if a field is found, displays a message in the status bar.

Set myField = Selection.PreviousField 
If Not (myField Is Nothing) Then StatusBar = "Field found"

See also

Selection Object

[!includeSupport and feedback]