Microsoft Word Suite
156
path
Returns the path to the specified recent file object. Read-only.
Note The path doesn't include a trailing character; for example, Macintosh HD:Users:Shared.
read only
True if changes to the document cannot be saved to the original document. Read/write.
Class: replacement
Plural
replacements
Represents the replace criteria for a find-and-replace operation. The properties and commands of
the replacement object correspond to the options in the Find and Replace dialog box.
To return a replacement object, use the replacement property. The following example replaces the
next occurrence of the word "hi" with the word "hello."
set myFind to find object of selection
set content of myFind to "hi"
clear formatting myFind
set content of replacement of myFind to "hello"
clear formatting replacement of myFind
execute find myFind replace replace one with match forward
To find and replace formatting, set both the find text and the replace text to empty strings (""), and
set the find format argument of the
execute find
command to true. The following example removes
all the bold formatting in the active document. The bold property is true for the find object and false
for the replacement object.
set myFind to find object of text object of active document
clear formatting myFind
set bold of font object of myFind to true
set content of myFind to ""
clear formatting replacement of myFind
set bold of font object of replacement of myFind to false
set content of replacement of myFind to ""
execute find myFind replace replace all
Properties
content
Returns or sets the text to replace in the specified text range or selection. Read/write.
font object
Returns or sets a
font
object that represents the character formatting of the replacement object.
To set this property, specify an expression that returns a font object. Read/write.