Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2024 by Barry MacDonnell. All Rights Reserved.

Page updated Dec 16, 2020

WordPerfect Tips
Main tips page | Browse more tips

Automatically associate a personalized keyboard or menu with a template or a specific feature

Related items -

•  To associate (i.e., automatically display) a custom toolbar with a custom template, see the Tip on "How to create a new, custom toolbar".

• 
To associate macros with a template see the bottom of the next column.
You can automatically use a personalized (i.e., customized) keyboard or personalized menu from another customized template so that the keyboard or menu will appear automatically when you open a new document based on the current template.

You can even have it appear only when you use a specific feature, such as a Header, Footnote, Outline, Table, Comment, etc. (This is similar to the way property bars (special toolbars) work: They appear when needed for the task at hand.)

Important

The instructions below were primarily created to help you transfer customized (i.e., personalized) keyboards or menus from an existing custom template into another custom template. [See also left sidebar about toolbars and macros.]

If you just need to transfer these items (or customized toolbars) from the default template in an earlier version of WordPerfect into a newer version of WordPerfect, you can do it more easily and more simply by copying these items directly from one version's default template into the other version's default template, as explained here.

This is a simple two-step process.
First you copy a keyboard or menu from a "source" template to the desired "target" or "destination" template. (This assumes that the keyboard is not already in the target template.) See Step 1 below for instructions on creating a new template.
 
Then you associate that keyboard or menu in the target template with any of several predefined features (or options) so that it will appear automatically whenever you are using that feature in a new document based on the new template. See Step 2 below.

As WordPerfect 2020's Help file (F1 key) says (searching for "Adding objects to project templates"),

"... WordPerfect lets you copy objects to project templates. You can also associate a feature in a project template with a menu or keyboard, so that the menu or keyboard displays when you use that feature. You can insert a trigger in a project template, so that a macro plays when you use a specific feature. ..."

And from an earlier version's Help file,
"... When you enable the Features button [see Step 2 below], the Items To Associate list has an option called Main. This option represents the ... keyboard and menu that will appear on the document screen when the template is first selected."

The 11 features (in addition to a choice for "No Association") in the Items to Associate list are:
Comments
Endnote
Equation Editor
Footers
Footnote
Graphics
Headers
Main
Outline
Tables
Watermark

STEP 1. COPYING A PERSONALIZED KEYBOARD (OR MENU) FROM A SOURCE TEMPLATE TO A TARGET TEMPLATE.

This step assumes that the personalized keyboard or menu is not already in the target template. If editing an existing template, you should make a backup copy of the template file (*.WPT) first.

Step 1a.
Create a new template, or open an existing one for editing:

■  To create a new custom template:

•  Click on File, New From Project (or just File, New in WP8), Options, Create WP Template.

A new document named Template1 will open on screen. You can 
- create the new template here from scratch; or
- use a document on disk by using Insert, File; or
- use one that is already open by copying it to the clipboard and then pasting it into the new, blank template.


•  To save the new template, click File, Save.

- Type a description (this displays in the list of projects and templates).
- Type a name for the template (used for the filename).
-
Select a template group (project category in WP9+), from which you can later select the template.
-
Click OK.

■  To open an existing template for editing:

•  Click on File, New From Project (or just File, New in WP8).

•  In the drop-down list under the "Create New" tab, select (i.e., click on) the category where the template's name is displayed.

•  In the window below the list, choose the project template.

• 
Click the Options button, then select "Edit WP Template." The template will open for editing, and should display a template property bar with several buttons on it (Build Prompts ... etc.)

■  To open the default template for editing:

•  Click on File, New From Project (or just File, New in WP8).

•  In the drop-down list under the "Create New" tab, select (i.e., click on) the category, "Custom WP Templates."

•  In the lower drop list, choose "Create a blank document."

This (oddly named) choice is the default template shipped with WordPerfect. For those who have multiple versions of WordPerfect installed on the same computer, see Footnote 1 on the Templates page here.

• 
Click the Options button, then select "Edit WP Template." The default template will open for editing, and should display a template property bar with several buttons on it (Build Prompts ... etc.) Note that the name of the actual default template file on disk is shown at the top of the WP window (e.g., wp8US.wpt ... wp19US.wpt, wp20US.wpt, etc.).

Step 1b.
Copy the personalized keyboard (or menu) from an existing template into the new template.

•  Click on Tools, Settings, Customize.

•  Click one of the following tabs:

- Menus
-
Keyboards

•  Click the Copy button.

•  Choose the template from which you want to copy (i.e., the "source" template) from the Template To Copy From list box.

•  Choose the menu or keyboard you want to copy in the Select Toolbars To Copy list box.

•  Choose the template to which you want to copy (i.e., the "target" template) from the Template To Copy To list box.

•  Click the Copy button.

Step 1b alternative: You can also use the Copy/Remove Objects... button on the template property bar.

Note: Unless you specify a template, the item will be associated with the current template.

STEP 2. ASSOCIATING A KEYBOARD (OR MENU) WITH THE TARGET TEMPLATE.
Once the personalized keyboard (or menu) exists in the target template you can associate it with any of the 11 features mentioned above. Then when you are using that feature in any new document based on that template the keyboard (or menu) will be enabled.

This is, for example, how WordPerfect displays the Merge toolbar: In the standard template the Merge toolbar is (internally) associated with the Merge feature. It appears only when you work with a data or form file for a merge.

Note
that if you simply want the keyboard or menu available in the main document area, you can select the previously copied keyboard or menu with Tools, Settings, Customize, Keyboards (or Menus). If you want these items available when you are in any of the other 10 features, take these steps to associate them with the desired feature:

a. Open the target template for editing.

Tip: If you want use associate features with the default template you can just click View, Toolbars and tick the box next to Templates

b. Click the Associate... button on the template property bar.

c. In the Associate dialog that appears, ensure that the Features radio button is enabled.

d. Click on one of the 11 items in the left-hand
Item to associate list to choose it. This is the item that will cause an automatic association of your personalized keyboard (or menu) when you are using that feature (e.g., Endnote, Footer, Outline, etc.)

Notes:

The
Item to associate list has an option called Main. This option represents the keyboard (and/or menu) that will appear on the document screen when the template is first selected.

Only features that you have created in a template or copied to a template will display in the Item to associate list.

e. Click the small down arrow button next to either the Menus or Keyboards drop list (depending on the type of item you want to associate with the option in the left-hand list); then choose (i.e., click on) the appropriate keyboard or menu that you copied into this template.

f. Repeat Steps 2d and 2e above to associate the keyboard or menu with other items. To remove an association, choose "No Association."

g. Click OK.

h. When finished, save your work with File, Save and then exit from the template with File, Close.

i.  If you manually displayed the Templates toolbar in step 2a above, don't forget to un-tick the Templates box in View, Toolbars when you are finished with this procedure.

Tips

¤  You can also copy custom styles into a new template from an earlier or later version of WordPerfect (or from another document created on another computer); see here for more.

¤  To "associate" a customized toolbar with a template, see the Tip on this page.

¤  Incidentally, while you can copy and associate top-level menus into a new template, be very careful about doing this between different WordPerfect versions. Because of changes and new features in each version, you may want to re-create personalized top-level menus rather than simply import old ones.

¤  It is also recommended that you do not copy property bars, since these are context-sensitive and might also vary with new features added in subsequent versions of WordPerfect. (You can easily add new buttons to any property bar, but it is a little tricky. See here for more information.)

About associating MACROS with a template . . .

You can only associate macros with macro triggers, which play the macro as you use the template in specific ways. For example, you can have a template macro play when you open a new document, or when you print the current document. Many WordPerfect projects have template macros embedded in them for just such purposes.

For more information about triggering and macros, see the "Triggers..." topic in WordPerfect's online Help (<F1> key, Index tab), or see Automating WordPerfect Templates in the "Automating documents and tasks" section of the Tips page.

For a macro that shows the associations in the current (or other) template, see Klaus Pfeiffer's TriggerDlg macro in the Code Snippets for Macros & Merges forum at WordPerfect Universe, here.


Page top