Find.Forward property (Word)
True if the find operation searches forward through the document. Read/write Boolean.
Syntax
expression. Forward
expression A variable that represents a 'Find' object.
Remarks
False causes a Word find operation to search backward through the document.
Example
This example replaces the next occurrence of the word "hi" in the selection with "hello."
With Selection.Find
.Forward = True
.Text = "hi"
.ClearFormatting
.Replacement.Text = "hello"
.Execute Replace:=wdReplaceOne
End With
The following example searches backward through the document for the word "Microsoft." If the word is found, it is automatically selected.
Selection.Collapse Direction:=wdCollapseStart
With Selection.Find
.Forward = False
.ClearFormatting
.MatchWholeWord = True
.MatchCase = False
.Wrap = wdFindContinue
.Execute FindText:="Microsoft"
End With
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for