Running macros
Macros are used to update the data in the Microsoft Word and Microsoft Excel output that is generated from IBM Engineering Lifecycle Optimization - Publishing (PUB). You can choose to run the macro directly from PUB by using the macro name property or you can add it as a post-processing command to run it on the generated output.
Before you begin
The product comes with sample style sheets that contain macros and VBScript files. In the ...\utils\word\ directory, you can find three files and in the ...\utils\excel\ directory, you can find two files:
File path and name | Description |
---|---|
PUB_install_dir\utils\word\rpe.dot |
A style sheet that contains macros. |
PUB_install_dir\utils\word\rpe_signed.dot |
A style sheet that contains macros. |
PUB_install_dir\utils\word\runmacro.vbs |
A scripting file that can run macros. |
File path and name | Description |
---|---|
PUB_install_dir\utils\excel\rpe.xltm |
A style sheet that contains macros. |
PUB_install_dir\utils\excel\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 name property
Procedure
- Record or specify the macro in the Microsoft Word or Microsoft Excel document that is being used as a style sheet.
- In the Launcher application, select the template that is listed in the document specification view.
- If you are using a style sheet that contains macros, for the style sheet property, enter the path to the document-style report or style sheet that contains the macro.
- For the Macro name property, enter an argument. Variables cannot
be used in your argument. Example:
macro_name macro_argument
- Generate the output.