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 Oct 25, 2024

HILITE - a suite of macros for annotating or marking up drafts or other documents using WordPerfect's highlighting feature in your preferred color(s):

HiLite.wcm - the computer equivalent of using up to 11 differently colored highlighter pens on a document

HiLiteDoc.wcm - highlight specific words in a document based on either [a] one or more words you input from an on-screen menu or [b] imported from a separate (saved) word list document

HiLiteNew.wcm - highlight text selections in a chosen color in the same document (similar to HiLite.wcm but useful to quickly access single colors from a toolbar or shortcut key)

HiLiteRem.wcm - remove all (or just some) highlighting from a document with an option to remove the underlying highlighted text

HiLiteRC.wcm - replace the color of existing highlights (either all highlights or specific highlights)

Download HILITE.ZIP (06/15/10; 92,586 bytes)

Compatible with WordPerfect 8 and later versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 (11.0.0.233) at the top of this page.

Downloading, Documentation, Modifications, and Support

See also -

HiLiteRL - Add highlighting to redlined text

"Customizing WordPerfect ..." Tips on how to create or modify a toolbar, keyboard, menu, etc.

Replace Codes - A macro to quickly change text attributes (e.g., bold, underline, italics, large size, etc.) by replacing, adding, or deleting a chosen attribute wherever it appears in the current document (can also replace a text attribute with highlighting)

Background notes and tips...

  Highlighting and highlighted are terms used in WordPerfect that refer to the result of applying a pair of special On/Off format codes ([Highlight(On)]..[Highlight(Off)]) around some text, which results in the text's background turning to a color.

    This format feature can be accessed with Tools, Highlight, On. (Some users have created a toolbar button for quick access to the Highlight On/Off feature) The effect is similar to adding (e.g.) Bold or Italics to some text (which also requires paired format codes), and it will be retained in the document when it is saved.

   This is an entirely different thing from what you see on screen when you simply select some text with mouse or keyboard and the text temporarily turns white on a black or blue background. No format codes are involved. It is merely a feature of Windows, not WordPerfect, and disappears when you click the mouse or press a key.

   While this may be obvious to some users, the similarity between the two effects can confuse others when describing them in the same way — i.e., as "highlighted text". Hence, selected text WordPerfect should be referred to as such (or with similar wording) to differentiate it from highlighted text. This can be particularly important when describing format issues or problems when you are working with others or seeking help on WordPerfect peer-support sites.

  WordPerfect has a manual highlight tool (but which is more limited than the macros below): Tools, Highlight, On (mentioned above). See the program's Help (F1) and search for "highlight". It's an On/Off toggle tool, which can also remove existing highlighting from selected text with Tools, Highlight, Off.

  Tools, Highlight, Print/Show must be enabled on that sub-menu to see or print highlighted text. You can turn it off temporarily if you want to print a document without the highlighting.

HiLite.wcm (v1.0) [Replaces the older HiLiteMenu.wcm macro]

Purpose: Type some text ... highlight any block of text ... type some more ... highlight some more (here, in a different color) ...

This macro immediately applies any one of several user-chosen highlight colors to one or more selected blocks of text, then returns the highlighting color back to the program's default of bright yellow (or any other user-preferred default color) when you dismiss the macro. This allows "marking up" many different selections of text as easily as using a highlighter pen on a paper document.

Basically, you need only -
[1]
play the macro to display a dialog (which remains on screen);
[2] choose a color (the default is green if you don't choose anything);
[3] then select some document text (which immediately becomes highlighted);
[4] select some more text (which becomes highlighted);
[5] click the Done button on the dialog when finsihed. Or if you are in a document, press <Esc>.
The program's current default highlight color (e.g., yellow — but can be changed in the macro code: see tips below) will be restored as the macro exits.

Screen shot Screen shot of HiLite dialog (appears on the right side of your screen by default)

As noted, when you play the macro you can continually select various words or several blocks of text and the selections are highlighted almost instantly. You can change colors any time for different purposes, and you can even switch among open documents to highlight them, too!

There is also a choice on the menu, "Remove All HL," that will remove all existing highlighting in the document in one operation. (Sometimes this is useful even before you begin your own highlighting for the session, to "clean" it up. Whenever you use it, a warning message is given so that you can confirm this choice. [Important: If you also use the Redaction Tool (Tools, Redaction) see below.])

You can always remove highlighting from individual items by deleting their [Highlight] codes in Reveal Codes.

Notes and tips

¤  While the macro is in use you can single-click once anywhere in the document to edit material in the document (i.e., type, delete, etc.).

¤  IMPORTANT: Selecting text while this macro is running will immediately highlight it in color and then selection mode for that block is turned off. So if you want to
select text to copy it or to perform some other selection-related task you will have to click on the "Done" button to stop the macro first.

¤  Adding the macro to a toolbar button will make it easier and quicker to access. See here for instructions.

¤  Be aware that if you use the WordPerfect Redaction Tool (introduced in WordPerfect X4 and accessed with Tools, Redaction) while editing the current document, then the macro will detect any existing Redaction marks and pop up a warning message to alert you. [...More]

¤ For complete instructions, tips, and notes, see the top of the macro's code. Click on Tools, Macro, Edit (which opens the macro file for viewing and editing).

¤  See also HiLiteNew.wcm below which offers a simple method to access a different color via a toolbar button or shortcut key, and immediately return the highlight tool to the default color.

Download HILITE.ZIP (full suite)


HiLiteDoc.wcm (v1.71)

Purpose: Highlights words or short phrases (63 characters or fewer, including spaces) in a document based on -

•  up to 10 words/phrases manually entered via a menu, or
•  a master list of words contained in a separate document.

An option on the first menu allows choosing from one of 10 highlight colors. (After playing the macro the highlight color is returned to your normal preferred color.)

Screen shot Screen shot of HiLiteDoc

Note that one of the options in HiLiteDoc ("Automatic - Use a search word file") requires a separate user-created WordPerfect document containing search words.

Please see the simple instructions at the top of the macro's code (open the macro as a normal document or use Tools, Macro, Edit), or click on Help from the pop up menu.

Note also that one of the checkbox options on a secondary macro menu screen — "Remove existing highlighting before processing" — is enabled by default. This was designed to prevent confusion on which text was processed by the macro. (You can, however, select a different highlight color from the primary macro menu screen, then disable that option. This lets you have different highlight colors for pre-existing items and the items processed by the macro.)
[Important: If you also use the Redaction Tool (Tools, Redaction) see below.])

Some of the macro techniques (for advanced users):
(1) Employ a separate document file (*.WPD) from which to sequentially read short strings of data; then switch documents and search for the strings. (Employ menu entry fields to do the same thing.)
(2) Use a help dialog in a menu, accessed via a push button.
(3) Change information on a menu without using callbacks. In HiLiteDoc, the top half of the main menu changes according to a previous menu selection or if an "Other Menu" button is pushed on the current menu.
(4) Write out information to a separate WPD file.

For complete instructions, tips, and notes, see the top of the macro's code. Click on Tools, Macro, Edit, which opens the macro file for viewing and editing.

Related: For WordPerfect X6 and later versions: See the Corel macro, Simple search and highlight.wcm, which does something similar — but for just one search term at a time. And it only temporarily highlights the words/phrases it finds: When you dismiss its dialog ('X' on the dialog) the highlighting it applied is removed.

Using the Redaction Tool:  Be aware that if you use the WordPerfect Redaction Tool (introduced in WordPerfect X4 and accessed with Tools, Redaction) while editing the current document, then the macro will detect any existing Redaction marks and pop up a warning message to alert you. [...More]

Download HILITE.ZIP (full suite)


HiLiteNew.wcm
(v1.01)

Purpose: Applies a user-specified highlight color to a selected block of text, then returns the highlight color back to the default (usually, bright yellow). (This is similar to HiLite.wcm above but it's useful to quickly access single colors from a toolbar or shortcut key.)

This makes it easy to apply a different highlight color to certain text, but retain the default color when highlighting is next applied with the Highlight toolbar button.

Note: To be able to quickly apply any of several different colors, you need to use different copies of this macro — one macro per color. See Tips below.

The WordPerfect program "remembers" which color was last used, so you can always reset the Highlight button's default color manually, but this macro makes it easier — especially siince WordPerfect does not reset the default highlight color between sessions. You can modify the macro's next-to-last command to choose any default color.

For complete instructions, tips, and notes see the top of the macro's code. Click on Tools, Macro, Edit, which opens the macro file for viewing and editing.

Tips

☼  Several copies ("clones") of this macro, each with a different highlight color and each assigned to its own toolbar button or keystroke combination, allows the quick application of different highlight colors to various parts of the same document without impacting your default highlight color. (The included macro is set to apply bright green highlighting to selected text.)

☼  To make copies of the macro that will apply different highlight colors, see the instructions in the comment area at the top of the macro's code. (Just open the macro for editing with Tools, Macro, Edit. Make the required change per the instructions, and then click Save & Compile from the macro toolbar.)

☼  If you select the same highlighted item and play the macro again, the highlighting (only) will be removed. It acts as a "toggle" switch.

☼  To play the macro(s) with a toolbar button or keystroke, click here for instructions. To edit the default toolbar button's icon, click here. [Note the tip there about using Corel Presentations to use a more extensive color pallette, or create buttons with shading, fills, etc. Note also that you can use text labels on buttons instead of icons on a toolbar; an example is found in a PDF article about creating a vertical toolbar here.]

☼  Here's an old example of a "Highlighting" toolbar you could create yourself with Tools, Settings, Customize, Toobars, Create, then click Macros, Add Macro to add buttons/macros for each color.  See the comments inside the HiLiteNew macro for more information. 

Highlighting toolbar

Note

Be aware that if you use the WordPerfect Redaction Tool (introduced in WordPerfect X4 and accessed with Tools, Redaction) while editing the current document, then the macro will detect any existing Redaction marks and pop up a warning message to alert you. [...More]

Download HILITE.ZIP (full suite)


HiLiteRem.wcm (v1.03)

Purpose: Removes highlights and (optionally) removes the highlighted words.

HiLiteRem also can be used to clean up documents containing comments, annotations, or other text that have been marked up with highlighting.

Screen shot Screen shot of HiLiteRem.

When you choose the menu option to "search for each item and prompt user with choice of action," a small dialog lets you -

(1) remove just the highlighting from the item,
(2) remove both the highlighting and the highlighted text,
(3) skip the item, or
(4) quit the macro.

This should make it easier to selectively edit a marked-up document.

Note:  Be aware that if you use the WordPerfect Redaction Tool (introduced in WordPerfect X4 and accessed with Tools, Redaction) while editing the current document, then the macro will detect any existing Redaction marks and pop up a warning message to alert you. [...More]

Download HILITE.ZIP (full suite)


HiLiteRC.wcm (v1.05)

Purpose: Replaces the color of existing highlighting in the document with a different color, either the current color that is specified on the WordPerfect toolbar (or Tools menu) or the color specified on the menu that pops up.

A menu option allows pausing to confirm individual replacements.

Screen shot Screen shot of HiLiteRC.

For modifications see the top of the macro's code. Click on Tools, Macro, Edit, which opens the macro file for viewing and editing.

Note:  Be aware that if you use the WordPerfect Redaction Tool (introduced in WordPerfect X4 and accessed with Tools, Redaction) while editing the current document, then the macro will detect any existing Redaction marks and pop up a warning message to alert you. [...More]

Download HILITE.ZIP (full suite)


Related tips

☼  Do you often need to remove highlighting from a single highlighted word or section of highlighted text?

WP has a built-in "Remove Highlighting" feature that you can add to a toolbar as a new button.

The button will be active only if the cursor is directly on some highlighted text or if a selected block of text contains highlighting.

Here's how to add this feature to a toolbar:

    • 1. Right-click the toolbar and choose Edit from the context menu. This will display the Toolbar Editor.
    • 2. Under the Features tab, choose Tools from the "Feature categories" drop list.
    • 3. Scroll down in the "Features" list and choose Remove Highlighting.
    • 4. Click on the "Add Button" button. When the new button appears on the toolbar (it looks like an old school blankboard eraser) you canuse your mouse to drag it to a new location. (If you are back in the main WordPerfect window (i.e., not in the Toolbar Editor),  press and hold the Alt key while you drag the button with your mouse (caution: if you drag it from the toolbar you will delete the button from that toolbar; if this happens just add it again [steps 1-3 above]).
    • 5. Click OK, then Close.

☼  Do you need to print a document without the highlighting?

Click Tools, Highlight and de-select the option, "Print/Show". This temprarily removes all highighting from the current document (You can observe this in Print Preview mode (File, Print Preview)

Remember to enable this option again following the print run to return the feature to its default setting (i.e., to enable showing (and printing) any highlighted text).

☼  Using the Redaction Tool (WordPerfect X4 and later) with Highlighting in the same document

Be aware that if you use the WordPerfect Redaction Tool (Tools, Redaction) while editing the current document and before finalizing the redactions, the HiLite macros on this page will detect any existing Redaction codes ([Redact:Mark]) and pop up a warning message to alert you.

Two reasons for the alert:

[1] Redaction mark-up codes
[Redact:Mark] act like Highlighting codes [Highlight], and they can sometimes interact in a document.

For example, when a section of text is first marked for redaction and then that section is also highlighted, or previously applied highlighting to that marked-up section is globally removed, the redaction codes might be removed.

Hence the macro's message suggests creating the final redacted document first, before removing any regular highlighting. Redaction codes will not exist in the finalized redacted document, so there won't be any conflict with normal highlighting — no matter how it is achieved — in the finalized redacted document.

[2] Furthermore, there can be an issue using a search/replace operation for [Highlight] codes when [Redact:Mark] codes are present: WordPerfect cannot tell them apart and will treat them equally (or in a macro search, just stop processing when a [Redact:Mark] is found).

These are issues with the design of the WordPerfect Redaction Tool — described on WordPerfect Universe here (and in a detailed downloadable PDF here) — and not an issue per se with the HiLite macros on this page.

Tip:

As an alternative to the Redaction Tool, see the Redactor macro. It is designed to create a printed document with your redactions.

It works by converting redlined text (Format, Font, Redline) to black highlighting -or- converts it to a white color -or- it can completely remove ("rubout") redlined text (and optionally clear Undo information). Also see that page about removing metadata, which can contain confidential information.

Disclaimer, Distribution, and Privacy Policies

Page Top