Running macros
Macros are used to update the data in the Microsoft Word output generated from Rational® Publishing Engine. Rational Publishing Engine updates Microsoft Word fields automatically
during document generation. If you need to run the macro again later,
you can choose to run the macro directly from Rational Publishing Engine using
the macro property or you can add it as a post-processing
command to run it on the generated output.
Before you begin
Rational Publishing Engine comes
with three files that contain macros that you can use. From the Central
Management component or the RPE_HOME\utils\word\ directory
in your installation files, you can find these files:
Both rpe.dot and rpe_signed.dot contain
the same styles and macros, but the rpe_signed.dot version
contains an electronic signature for source verification. These files
contain macros that can embed OLEs and update the output fields for
Table of contents, Table of figure, and Table of table elements. The runmacro.vbs macro
accepts 0 to 10 arguments for the Microsoft Word
macro. You can use these macros or record your own.| File path and name | Description |
|---|---|
| RPE_HOME\utils\word\rpe.dot | A stylesheet that contains macros. |
| RPE_HOME\utils\word\rpe_signed.dot | A stylesheet that contains macros. |
| RPE_HOME\utils\word\runmacro.vbs | A scripting file that can run macros. |
About this task
Note: If you are
using variables in your macro argument, you must use the post-command property
to run your macro.
Running the macro by using the macro property
About this task
Procedure
- Record or specify the macro in the Microsoft Word document that is being used as a style sheet.
- In the Launcher application, select the template listed in the document specification view.
- If you are using a stylesheet that contains macros, for the stylesheet property, enter the path to the document or style sheet that contains the macro.
- For the macro property, enter an argument. Example: macro_name macro_argument
- Generate the output.
