Microsoft Word Suite
347
Example
This example unprotects the active document, using "Blue" as the password.
if protection type of active document is not no document protection then
unprotect active document password "Blue"
end if
This example unprotects the active document. If the document has a password, a dialog box
prompts the user for the password. Text is inserted, and the document is protected for revisions.
set aDoc to active document
if protection type of aDoc is not no document protection then
unprotect aDoc
insert text "department six" at text object of selection
protect aDoc protection type allow only revisions password "Blue"
end if
Command: update
Updates the values shown in a built-in Word dialog box; the entries shown in the specified index,
table of authorities, table of figures or table of contents; or the specified link.
Note To update the page numbers of items in a table of contents or figures, use the
update page
numbers
command.
Syntax
update link format/table of figures/table of contents/table of authorities/dialog/index Required.
An expression that returns an object in the list.
Example
This example updates the first table of figures in the active document.
if (count of tables of figures of active document) 1 then
update table of figures 1 of active document
end if
This example returns a dialog object that refers to the Font dialog box. It then changes the font
applied to the selection object to Arial, updates the dialog box values, and displays the Font dialog
box.
set myDialog to (get dialog dialog format font)
set name of font object of selection to "Arial"
update myDialog
show myDialog