Microsoft Word Suite
346
Command: undo clear
Clears the list of actions that can be undone for the specified document. Corresponds to the list of
items that appears when you click the arrow beside the Undo button on the Standard toolbar.
Note Include this method at the end of a macro to keep script actions from appearing in the Undo
box (for example, VBARange.InsertBefore).
Syntax
undo clear document Required. An expression that returns a document object.
Example
This example clears the list of actions that can be undone for the active document.
undo clear active document
Command: unlink
Replaces the specified field with its most recent result.
Syntax
unlink field Required. An expression that returns a field.
Remarks
When you unlink a field, its current result is converted to text or a graphic and can no longer be
updated automatically. Note that some fields, such as XE (Index Entry) fields and SEQ (Sequence)
fields, cannot be unlinked.
Example
This example unlinks the first field in "Sales.doc."
unlink field 1 of document "Sales.doc"
This example updates and unlinks all the fields in the first section in the active document.
repeat with aField in (get fields of section 1 of active document)
update field aField
unlink aField
end repeat
Command: unprotect
Removes protection from the specified document. If the document isn't protected, this command
generates an error.
Syntax
unprotect document Required. An expression that returns a document object.
[password Unicode text] Optional. The password string used to protect the document.
Passwords are casesensitive. If the document is protected with a password and the correct
password isnt supplied, a dialog box prompts the user for the password.