Using template macros
WordPerfect lets you add macros to a template. Template macros are macros attached to a template and are saved as part of that template file. They can be played only from that template and are not listed with standard macros.
There are three ways to add a macro to a template: you can add a template macro from another template; add a macro from a macro file stored on disk; or record a template macro from scratch.
You can record macros for specific templates and select specific templates as the default location to which you can record macros. You can only view the macros saved with the current template.
You can play a template macro. WordPerfect includes several templates with macros that are ready to use. You can pause a template macro if you need to interrupt the macro you are playing. You cannot play a template macro until you save and exit the template to which it is attached.
You can pause while playing a template macro. This can be useful if you want to allow users time to type in text when they run the template macro.
To add a template macro from another template |
1.
|
|
Click File New from project.
|
2.
|
|
Choose a category from the Category list box.
|
3.
|
|
Choose a template from the Project list.
|
4.
|
|
Click Options Edit WP template.
|
5.
|
|
Click the Copy/Remove object button on the Template toolbar.
|
6.
|
|
In the Copy/Remove template objects dialog box, choose the template that contains the macro from the Templates to copy from list box.
|
7.
|
|
Choose Macros from the Object type list box.
|
8.
|
|
From the Source list box, choose the macro you want to copy.
|
9.
|
|
Click one of the following:
|
•
|
Copy — copies only selected items in the Macros list
|
•
|
Copy all — copies all items in the Macros list
|
•
|
|
If the Template toolbar is not displayed, click View Toolbars, and enable the Template check box.
|
To record a template macro from scratch |
1.
|
|
Click Tools Template macro Record.
|
2.
|
|
Type the name of the macro in the Name box.
|
3.
|
|
Click Location.
|
4.
|
|
Enable one of the following options in the Macro location dialog box:
|
•
|
Current template — specifies the current template to record a template macro to
|
•
|
Default template — specifies the default template to record a template macro to
|
If you want to record a template macro to the enabled location by default, enable the Use as default check box.
|
5.
|
|
Click OK.
|
6.
|
|
Click Record.
|
7.
|
|
Perform the task you want to record.
|
•
|
|
If you are recording a new macro, clicking Edit Undo does not undo the most recent step performed; you will still retain the step that you tried to undo.
|
To play a template macro |
1.
|
|
Click File New from project.
|
2.
|
|
Choose a category from the Category list box.
|
3.
|
|
Choose a template from the Project list box.
|
4.
|
|
Click Create.
|
5.
|
|
Click Tools Template macro Play.
|
6.
|
|
Choose a macro from the
Macros in template list. |
The macro name displays in the Name box.
|
7.
|
|
Click Play.
|
•
|
|
If you want to use the Number of times to repeat next action value as a default, click Use as default.
|