Microsoft Word Suite
221
Example
This example adds a single-line page border to all sections in the active document.
set s1 to section 1 of active document
set outside line style of border options of s1 to line style single
set outside line width of border options of s1 to line width50 point
apply page borders to all sections border options of s1
Command: apply theme
Applies a theme to a document.
Syntax
apply theme document Required. An expression that returns a document object.
name Unicode text Required. The name of the theme plus any theme formatting options you
want to apply. The format of this string is theme nnn where theme and nnn are defined as
follows:
String Description
theme The name of the folder that contains the data for the requested theme. (The default location
for theme data folders is Microsoft Office 2004/Office/Themes.) You must use the folder
name for the theme rather than the display name that appears in the Theme dialog box
(Theme command, Format menu).
nnn
A three-digit string that indicates which theme formatting options to activate (1 to activate,
0 to deactivate). The digits correspond to the Vivid Colors, Active Graphics, and
Background Image check boxes in the Theme dialog box (Theme command, Format
menu). If this string is omitted, the default value for nnn is "011" (Active Graphics and
Background Image are activated).
Example
This example applies the Artsy theme to the active document and activates the Vivid Colors option.
apply theme active document name "artsy 100"
Command: auto format
Automatically formats a document.
auto format document Required. An expression that returns a document object.
Example
This example automatically formats the active document.
auto format active document