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-2017 by Barry MacDonnell. All Rights Reserved.

Page updated Oct 16, 2015

WordPerfect Tips
Main tips page | Browse tips

Automatically associate a personalized keyboard or menu with a template

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, etc.

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.

As WordPerfect 9's Help file says,

". . . menus and keyboards can be associated with a predefined list of features, which can be activated when the particular feature is used in a document. 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 options in the "Items to Associate" list are:
Comments
Endnotes
Equation Editor
Footers
Footnotes
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; 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 categoryin 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.

•  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."

•  Select "Create a blank document."

• 
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, wp9US.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 alternate: 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. 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.

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

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

d. Choose (i.e., click on) one of the 11 items in the left-hand list. 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.) Note that the 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.

e. Click the small 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); 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.

Notes

¤  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