Microsoft Word Suite
348
This example updates any fields in the active document that aren't updated automatically.
repeat with aField in (get fields of active document)
if auto update of link format of aField is false then
update link format of aField
end if
end repeat
Command: update document
Updates the envelope in the document with the current envelope settings.
Note If you use this command before an envelope has been added to the document, an error
occurs.
Syntax
update document envelope Required. An expression that returns an envelope object.
Example
This example formats the envelope in Report.doc to use a custom envelope size (4.5 inches by 7.5
inches).
try
set myEnv to envelope object of document "Report.doc"
set default height of myEnv to inches to points inches 4.5
set default width of myEnv to inches to points inches 7.5
update document myEnv
on error
display dialog "Report.doc doesn't include an envelope"
end try
This example adds an envelope to the active document, using predefined addresses. The default
envelope bar code and Facing Identification Mark (FIM-A) settings are set to true, and the envelope
in the active document is updated.
set addr to "Luciano Ravenna" & return & "1234 E. Main St." & return ¬
& "Our Town, WA 98004"
set ret to "Jacob Sanjay" & return & "N. 33rd St." & return ¬
& "Other Town, WA 98040"
insert envelope data envelope object of active document address addr ¬
return address ret
set default print bar code of envelope object of active document to true
set default print FIMA of envelope object of active document to true
update document envelope object of active document