Microsoft Word Suite
324
Command: run letter wizard
Runs the Letter Wizard on the specified document.
Syntax
run letter wizard document Required. An expression that returns a document object.
[letter content letter content] Optional. A letter content object. Any filled properties in the letter
content object show up as prefilled elements in the Letter Wizard dialog boxes.
[wizard mode Boolean] Optional. True to display the Letter Wizard dialog box as a series of
steps with a Next, Back, and Finish button. False to display the Letter Wizard dialog box as if
it were opened from the Tools menu (a properties dialog box with an OK button and a Cancel
button). The default value is false.
Example
This example starts the Letter Wizard for the active document.
run letter wizard active document ¬
letter content (letter content of active document)
Command: run VB macro
Runs a Visual Basic macro.
Note Only public Sub procedures that take no arguments, which includes all procedures
generated by the macro recorder and all procedures you can run from the Macros dialog box, can be
run by using the run VB macro command.
Syntax
run vb macro
macro name Unicode text Required. The name of the macro. Can be any combination of
template, module, and macro name. For example, the following statements are all valid.
run VB macro macro name "Normal.Module1.MAIN"
run VB macro macro name "MyProject.MyModule.MyProcedure"
run VB macro macro name "'My Document.doc'!ThisModule.ThisProcedure"
If you specify the document name, your code can only run macros in documents related to the
current context, not just any macro in any document.
You cannot pass parameters to a procedure by using the run VB macro command.
Example
This example prompts the user to enter a macro name, and then it runs that macro.
set mn to text returned of (display dialog "Enter the macro name" ¬
default answer "")
run VB macro macro name mn