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

Page updated Sep 25, 2018

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 (11.0.0.233) 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 to trim unwanted items (or clip desired 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. Before using the macro to help create a concordance, see also the Recommendation and  Resources and Tips sections.

Compatibility

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 - Tips on indexing - Creating a Glossary of Terms. [Highly recommended to read before using the WordList macro to create a concordance file.]

•  HSpacer - Converts normal space characters in selected text to hard spaces (same as manually using Ctrl+spacebar to insert a [HSpace] code) to join the selected words and prevent splitting up certain phrases, legal citations, etc., that should not "wrap" down to the next line at the right margin. Using hard spaces will also keep such items intact when creating the word list later.

•  Clipper - A macro that lets you select material in the current document (or any open WordPerfect document, even the WordList document) and automatically clip (i.e., copy or move) it to a separate temporary document. Clipped material is appended to that temporary document. A dialog remains on screen until dismissed to allow you to make multiple clips.

    Tips:

☼  If you enable the options on the Clipper menu to clip material as unformatted ("plain") text and to separate the clips by one hard return, you could create a list of special words and phrases by clipping (copying) them from any of your currently opened documents.

You could then add this "clipped" list to a previously edited (i.e., trimmed) Alphabetical list generated by the WordList macro to give you a comprehensive concordance file.

- or -

You can simply clip desired material directly from the WordList document into a new document that will, in turn, become your concordance file. This alternative might be easier and/or more precise for some users than block selecting and deleting material from that initial list to trim it of unwanted items. (Mass deletions can often produce mistakes.)

☼  The author's RemDupes macro might be helpful in removing duplicate entries from lists generated by Clipperor by some other method. [If the list is already sorted alphabetically (as with the WordList macro, RemDupes does that for you) you might only need to visually inspect the list to detect and manually remove duplicates.]

•  TrimTo63 - If you want to use an existing, 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 the WordList.wcm macro has an option to do this automatically at run time.

•  If you 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.