Microsoft Word Suite
111
Class: find
Plural
finds
Represents the criteria for a find operation. The properties of the find object correspond to the
options in the Find and Replace dialog box.
To return a find object, use the find object property of the text range or selection object class. The
following example finds and selects the next occurrence of the word "hi."
set myFind to find object of selection
clear formatting myFind set content of myFind to "hi"
execute find myFind with match forward
The following example finds all occurrences of the word "hi" in the active document and replaces
the word with "hello."
set myRange to text object of active document
execute find (find object of myRange) find text "hi" replace with "hello" ¬
replace replace all
Remarks
If you've gotten to the find object from the selection object, the selection is changed when text
matching the find criteria is found. The following example selects the next occurrence of the word
"blue."
execute find (find object of selection) find text "blue" with match forward
Properties
all documents
True if the find operation searches all open documents for the text to find. Read/write.
Note To specify the text to be located in a document, use the content property of the find
object or use the find text argument with the
execute find
command.
content
Returns or sets the text to find or replace in the specified range or selection. Read/write.
font object
Returns or sets a
font
object that represents the character formatting of the find object. To set
this property, specify an expression that returns a font object. Read/write.
format
True if formatting is included in the find operation. Read/write.
forward
True if the find operation searches forward through the document. False if it searches
backward through the document. Read/write.