Microsoft Word Suite
230
Example
This example clears all nonspecific options before executing a search in the selected range. If the
word "
" is formatted as bold, the entire paragraph will be selected and copied to the
Clipboard.
clear formatting find object of selection
clear all fuzzy options find object of selection
set bold of font object of find object of selection to true
set utxtViolin to «data utxt30D030A430AA30EA30F3»
execute find find object of selection find text utxtViolin with ¬
find format and match forward
if found of find object of selection is true then
expand selection by a paragraph item
copy object selection
end if
Command: clear formatting
Removes any formatting specified as part of a find or replace operation. Corresponds to the No
Formatting button in the Find and Replace dialog box (Edit menu).
Note To ensure that unwanted formats arent included as criteria in a find or replace operation, use
this command before carrying out the operation.
Syntax
clear formatting find/replacement/selection object Required. An expression that returns a find,
replacement, or selection object.
Example
This example clears formatting from the find or replace criteria before replacing the word "Inc." with
"incorporated" throughout the active document.
set myRange to text object of active document
clear formatting find object of myRange
clear formatting replacement of find object of myRange
set match whole word of find object of myRange to true
execute find find object of myRange find text "Inc." ¬
replace with "incorporated" replace replace all