Microsoft Word Suite
This example removes formatting from the find criteria before searching through the selection. If the
word "Hello" with bold formatting is found, the entire paragraph is selected and copied to the
clear formatting find object of selection
set bold of font object of find object of selection to true
execute find find object of selection find text "Hello" with find format and ¬
if found of find object of selection is true then
expand selection by a paragraph item
copy object selection
Command: click object
Clicks the specified field. If the field is a GOTOBUTTON field, this command moves the insertion
point to the specified location or selects the specified bookmark. If the field is a MACROBUTTON
field, this command runs the specified macro. If the field is a HYPERLINK field, this command
jumps to the target location.
click object field Required. An expression that returns a field object.
If the first field in the selection is a GOTOBUTTON field, this example clicks it (the insertion point is
moved to the specified location, or the specified bookmark is selected).
set myField to field 1 of selection
if field type of myField is field go to button then click object myField
Command: close print preview
Switches the specified document from print preview to the previous view. If the specified document
isn't in print preview, an error occurs.
close print preview document Required. An expression that returns a document object.
This example switches the active window from print preview to normal view.
if do print preview is true then close print preview active document
set view type of view of active window to normal view