Microsoft Word Suite
93
Using the active document property
You can use the active document property to refer to the document with the focus. The following
example uses the activate command to activate the document named "Document 1." The example
also sets the page orientation to landscape mode and then prints the document.
activate document "Document 1"
set orientation of page setup of active document to orient landscape
print out active document
Properties
active theme
Returns the name of the active theme plus the theme formatting options for the specified
document. Returns none if the document doesn't have an active theme. Read-only.
For an explanation of the value returned by this property, see the name argument of the
apply
theme
command. The value returned by this property may not correspond to the theme's
display name as it appears in the Theme dialog box (Theme command, Format menu). To
return a theme's display name, use the active theme display name property.
active theme display name
Returns the display name of the active theme for the specified document. Returns none if the
document doesn't have an active theme. Read-only.
A theme's display name is the name that appears in the Theme dialog box (Theme command,
Format menu). This name may not correspond to the string you would use to set a default
theme or to apply a theme to a document.
active window
Returns a
window
object that represents the active window (the window with the focus). If
there are no windows open, an error occurs. Read-only.
attached template
Returns a
template
object that represents the template attached to the specified document. To
set this property, specify either the name of the template or an expression that returns a
Template object. Read/write.
auto hyphenation
True if automatic hyphenation is turned on for the specified document. Read/write.
background shape
Returns a
shape
object that represents the background shape in the specified document. Read-
only.
click and type paragraph style
Returns or sets the default paragraph style applied to text by the Click and Type feature in the
specified document. To set this property, specify either the local name of the style, an integer, a
built-in style, or an object that represents the style. Read/write.
If the in use property for the specified style is set to false, an error occurs.