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

Page updated Oct 16, 2009

WordPerfect Tips
Main tips page | Browse more tips
Automatically run the spell checker before printing a document

You could create a macro that brings up the spell checker, then prints, and assign the macro to your toolbar. But you would have to remember to use the macro each time you want to spell check and print.

A better solution: Create a template macro inside the template the user uses to create the document. Here's how:

1. Edit the desired template: Click on File, New from Project (in WordPerfect 9, or File, New in WP8), then right-click the desired template, and then select Edit WP Template. [Note: if you want to edit the *default* template -- the one on which all new blank documents are based -- look for the one labeled "Create a blank document" in the group "Custom WP Templates."]

The actual template (with a filename ending in .WPT) should appear onscreen.

2. On the top menu, click on Tools, Template Macro, Record. In the small dialog box that pops up, give the new template macro a name, then click on Record. Next, on the top WP menu, click on Tools, Spell Checker. When the Spell Checker appears, close it immediately and click the left-hand button on the template macro toolbar (the one that has a cassette icon) to stop the recording.

Now you will need to modify the macro due to a small quirk in WP as noted in a Corel Knowledge Base article (which was at http://kb.corel.com/kbdocs/FOD/6137.htm, but has been removed). Click on Tools, Template Macro, Edit, and select the new macro to edit. Change the code to read as follows:

Application (WordPerfect; "WordPerfect"; Default!)
   test:=Applocate("Writing Tools")

NOTE: If this macro doesn't work properly, most likely you will need to create a separate "floating" spell checker window -- one that says "Writing Tools" at the top of the spell checker window -- by bringing up the spell checker (in any open document) and

"... moving the mouse pointer into the blank area to the right of the three "Tabs" (Spell Checker, Thesaurus, and Grammatik) until it becomes a [four headed arrow], then click on the mouse (usually the left button) and drag the dialog up slightly. It should then become a separate dialog with its own title bar that says "Writing Tools." This will allow the macro example above to work correctly, and the dialog should remain as a separate dialog in future sessions of WordPerfect unless it is dragged and dropped back to its original position...." [Corel KB]

If you already have a floating spell checker window -- i.e., you can drag it around the screen -- and it says "Writing Tools" at the top, you won't need to do the above. But if the macro still won't work ... sorry, but I can't help. Still, it's worth a try.

3. Finally, in order for the macro to play automatically, you will need to have WP "trigger" it when you go to print the document. [For more information on triggers, see WP's Help file Index, under "triggers" and also "Trigger" a macro ..."]


On the template toolbar, click on Associate to bring up the Associate dialog. Then click on the Triggers radio button, then on "Pre Print" in the left drop list window. In the Macros drop list on the right side of the Associate dialog, select the name of your macro, then click OK. You should be back in the template document.

4. Save the template (File, Save), then close it (File, Close).

5. Test: Open a new document based on the template, enter some text (perhaps with some obvious errors), and print it. The spell checker should appear, and after you dismiss it the document should print.


  • If you plan to share documents containing template macros with other WordPerfect users, take note of this:
    • If a template containing a template macro is set to be triggered by some event, note that the template macro will only trigger in a document (.WPD) if the template (.WPT) is present, either in the original template folder or in the default (parent) template folder. If WordPerfect cannot locate the template, the template macro will not play even though it is embedded in the document itself, since the trigger specification is stored in the template, not in the resulting document.
    • This can cause problems when sharing such automated documents with other WordPerfect users. Make sure they also have the template that spawned the document and it is located in the same relative folder as the original. [This might explain why template macros fail to automatically play in some documents if the original template has been renamed, relocated, or removed.
  • If the macro does not play automatically, template macros may have been turned off by a user. See here.