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

Page updated Jul 30, 2017

WORDLIST - Creates a separate list of words that appear at least once in the currently open document (or the current selection), sorted by frequency or alphabetically (or both)

Download WORDLIST.ZIP (version 1.0; 02/07/2012; 219,323 bytes; ZIP includes a  "readme" documentation file)

Compatible with WordPerfect X5+ and probably earlier versions back to WordPerfect 10. (Sorry, not for WP9 and earlier.)

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

Downloading instructions, Documentation, Modifications, and Support

Related pages -

•  Indexing documents with WordPerfect (manual and concordance methods)

•  Index Tools - Tutorials, macros, and tips to help you index a document

Two related functions to help with your writing style or indexing

The WordList.wcm macro creates either -

(A)    a frequency list of each of the words in the currently open document (or in a pre-selected block of text in the document), with duplicates removed, along with the number of times each item appears in the selection (i.e., its frequency of appearance);

- or -

(B)    an alphabetical list of each of the words in the currently open document (or in a pre-selected block of text in the document), with duplicates removed, but without showing the number of times each item appears in the selection. The list can then be manually edited (trimmed) of unwanted items to create a workable concordance file to help create an index for a document. (It can also serve to visually check for the misspelling of important words, since they will probably show up adjacent to each other.)

Creating a frequency list was the original idea behind this macro. Creating an alphabetical list was included as a convenient way to create the initial draft of a concordance file you can use when indexing a document.


The macro was created in WordPerfect X5 and tested in X5/X6, but it should work in WordPerfect 10 and later versions. (A command used in this macro was not present in WordPerfect 9 and earlier. If you play it in such an early version it will pop up a warning message and then quit.)

Strong recommendation

Please read the included documentation (WordList.wcm readme.pdf; 11 pages), since knowing how the macro deals with certain items will help you use it more effectively and let you what to expect from it. [Yes, it's a bit time-consuming to learn about a new macro's operation -- but not as time-consuming as (e.g.) manually creating an alphabetized draft of a concordance file in a large document.]

The documentation covers topics such as: 

  • how the macro can sort a frequency list (alphabetical lists are always sorted in ascending order)
  • what is (and is not) processed
  • upper and lower case
  • what is considered a "word" by the macro (also: hyphenations and abbreviations)
  • how to exclude some items (and how to customize the items to exclude)
  • using alphabetical lists as concordance files to help index a document
  • how to make simple modifications to the macro's operation
  • related macros (see below), such as using Clipper.wcm to extract phrases from your document and add them to the list
For convenience, the same information in the PDF documentation file is located in a comment area at the top of the macro's code.

Instructions and general operation

(1) Select a block of text in the body text area of the document -- or even the entire document (Edit, Select, All). Generally you will want to select several paragraphs or pages. If you do not select anything the macro will process the entire document.

(2) Play the macro, and make your initial choice of the type of list from the first menu that appears. Click OK. A second menu will then appear, related to your first choice. Note that some options on this menu will differ depending on whether you wish to create a frequency list or a plain alphabetical list. Click OK again.

Screen shot: Screen shot Main WordList menu
Screen shot: 
Screen shot Frequency list sub-menu
Screen shot: 
Screen shot Alphabetical list sub-menu

When the macro plays, one of the first things it does is copy everything into a separate document window so that processing will not impact your current document. A small "Please Wait" dialog will appear to show the macro's progress. The final word list will appear in that separate document window so it can be saved for future use. (A summary of what was processed will appear above the words.)

N.B.: Even though the macro does all processing in a separate document window, it is always a good idea to save your current work before using this macro or any other macro or program.

Speed of processing

To isolate individual words, then sort them and remove duplicates, several dozen steps must be taken by the macro. It can take anywhere from (normally) under a minute to (rarely) several minutes or more to process a document, depending on (1) the number of options you enable when you play the macro; (2) the length of the document; (3) your computer's processing speed; (4) the amount of available computer memory; etc.

Tip: Start with a small document or a small selection of text to see how the macro works before attempting large, complex documents.

Modifications to the macro's menus and/or the way it works

You can modify the default selections on the macro's menus and/or the way the macro works. See the "readme" file included in the download archive file. (This information is also included at the top of the macro's code: just open the macro like any WordPerfect document to view or edit it, or use Tools, Macro, Edit.)

¤  Update [Aug 26, 2013]: One of the things you can modify is the list of "minor words" the macro can exclude from processing. Currently it contains 239 items. However, there may be a limit to the number of items you can directly assign to an Array[] command. It appears to be about 247 items, as noted here ... so the macro list is nearly full (but you could delete some items to make room for others).

Resources and tips

  • IndexDocs - Indexing documents with WordPerfect - The manual and concordance file methods.
  • HSpacer - Converts normal spaces in selected text to hard spaces (same as manually using Ctrl+spacebar) to prevent word wrap in phrases, legal citations, etc. This will also keep such phrases intact when creating the frequency list later.
  • Clipper - A macro that lets you select material in the current document (or any open WordPerfect document) and automatically clip (copy or move) it to a separate temporary document. Clipped material is appended to the temporary document. A dialog remains on screen until dismissed to allow multiple clips.
        Tip: If you enable the option of the Clipper menu to separate the clips by one hard return, you could create a list of special words and phrases by clipping (copying) them from your current document. You could then add this list to the edited Alphabetical list the WordList macro can generate to give you a comprehensive concordance file.
         Tip: The author's RemDupes macro might be helpful in removing duplicate entries from lists generated by Clipper or by some other method.

  • TrimTo63 - If you want to use a plain alphabetical list as a draft of a concordance file, you will want to trim the length on any long items to 63 characters (the WordPerfect-imposed limit) so you don't get an error later when creating an index using the concordance. Note that this (WordList.wcm) macro has an option to do this automatically at run time.
  • If need multiple indexes in a document, see Lindsay Rollo's Indexing.zip file. It "includes three macros and a PDF document (Indexes and Indexing.pdf) which outlines an approach to creating indexes; identifies alternative methods of selecting and marking index entries; demonstrates a technique for creating multiple indexes to any document; lists macros designed to assist indexing; and provides an example of a suitable index format."
  • For other indexing tools, see IndexList, IndxHead, IndxWord, ListWord, and PageLine.