"Ads by Google" links provided by Google.com, which has sole control over all advertising content it displays on this site.

Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2008 by Barry MacDonnell. All Rights Reserved.

Page updated May 20, 2008

Blue bullet Download UNIQUE.ZIP
Contains -
Unique.wcm, v2.02, 01/11/08;
Caps2end.wcm, v1.01; 01/11/08;
WordFreq.wcm, v1.02; 01/11/08;
RemDupes.wcm, v1.03; 01/11/08;
IndxHead.wcm, v1.0; 11/07/03;
IndxWord.wcm, v1.0, 11/10/03;
TrimTo63.wcm, v1.01, 01/11/08
ListWord.wcm, v.0, 6/21/07
Unique.zip-Readme.wpd; 5/20/05
ZIP file total = 158,671 bytes

Compatible with WordPerfect Compatible with WordPerfect 8-X3+

Downloading, Documentation, Modifications, and Support

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.

IMPORTANT INFORMATION:

WordPerfect 11/12/X3/X4+

WordPerfect Office 11/12/X3/X4 (except trial editions) comes with a shipping macro, Concord.wcm, which performs the same general function as Unique.wcm and is automatically accessed by the program from within WordPerfect's Tools, Reference, Index, Define dialog (via the Create button).

However . . .

Red bullet The comments and limitations discussed here (and duplicated in the Unique macro's Help dialogs) also apply to Concord. Because the on-line Help dialogs for the concordance feature are very rudimentary (at least, up to WPX3), you should read all the material here that relates to "Unique.wcm". Otherwise you will not be able to use the built-in concordance feature (Concord) in any useful way. Note also that Concord has not changed since WP10. Try both to see which you prefer.

Red bullet See also the information here about using macros (from any source, not just this website) in WordPerfect 11.0.0.233 (i.e., the initial release) and 11.0.0.300 (i.e., Service Pack 1).

Concord.wcm can be played as a standalone macro, just like Unique.wcm. Normally, however, it is played automatically by WordPerfect when you use the built-in index feature: Click on Tools, Reference, Index; the indexing pane will appear on the bottom of the document window. Clicking on the Define button in that pane brings up the Define Index dialog where you can define the style of the index, and create a new concordance file or specify an existing concordance file. [NOTE: If you cannot see a Define button in the Reference Tools dialog, see Footnote 1 below.]

Note that the Create button at the bottom of the Define Index dialog simply plays the Concord.wcm macro, which creates a new concordance file, which then must be edited [to remove unwanted items (see the next column)] and saved to disk. It is not clear from the WordPerfect Help (F1) files (in WP11-WPX3 at least) that you must edit this file to remove unwanted entries. An index created using an unedited concordance file created by either the Concord or Unique macro would list every word in the document!

The OK button at the top of the Define Index dialog creates the actual index, using the previously saved concordance file named in the 'Filename:' field.

Summary: Create the concordance file using either the Unique macro or the WP11/12/X3/X4 concordance feature; edit it and save it to disk, then use it with Tools, Reference, Index, Define.

Note that the file, Concord.wcm, is titled "Concordance.wcm" at the top of the macro's code. This is not a problem insofar as the macro's operation is concerned. Corel apparently followed the "8.3" filename convention and reduced the number of characters in the filename. It is typically located in the Corel\WordPerfect Office 11(or 12)\Macros\wpwin folder, or for WPOX3 and WPOX4, in the Corel\WordPerfect Office X3\Languages\EN\Macros\wpwin or Corel\WordPerfect Office X4\Languages\EN\Macros\wpwin folders (for ENglish language versions).

For more information about WP10/11/12/X3/X4 (especially changes made to the WP program in these versions) and their impact on these "concordance" macros, see the Readme file included in the download (ZIP) file.

WordPerfect 8

When playing macros in WP8, sometimes clicking outside a message box or other dialog window can make the dialog seem to disappear (it's only sent behind the current window; just minimize the current window to get at the dialog). The Unique macro uses such messages and dialogs. Ron Hirsch has found that if you open the macro and make an insignficant change, such as adding a single space, and then Save & Compile it, the problem usually disappears. In any event, if you experience disappearing dialogs with any macro try recompiling the macro after making a small, insignificant change to it.

UNIQUE - A suite of 8 macros with information and tips to help you index a document

Blue bullet Unique.wcm - Creates a list of all the different ("unique") words in a document. The list can be used to help create a concordance file, which can then be used to automate the indexing of a document.
Blue bullet Caps2End.wcm - "Send Capitals to the End of the document" - This macro locates all words with initial capital letters in a (usually) sorted list and either copies or moves them to the end of the list.
Blue bullet WordFreq.wcm - A macro that produces a word frequency count -- i.e., the number of times each different word appears in a document.
Blue bullet RemDupes.wcm - "Remove duplicates" - This macro is designed to remove duplicate items from a list of items. [See notes in the section below.]
Blue bullet IndxHead.wcm - "Index headings" - This macro marks the first 64 text characters in standard and custom paragraph styles in the document for indexing (typically, these are section headings formatted with such styles as Heading 1, Heading 2, MyHeading, etc.).
Blue bullet IndxWord.wcm - "Index word(s)" - A macro that marks the selected word(s) or (if nothing is selected) the word at the cursor location, as an index entry (i.e., as an index Heading item).
Blue bullet TrimTo63.wcm - Trim concordance items to 63 characters - This macro is designed to be used with an existing concordance file that was created by means other than the Unique.wcm macro. (Unique will do all trimming during the creation of a concordance.)
Blue bullet ListWord.wcm - This macro copies the selected word(s) or, if nothing is selected, the word at the cursor location, to the very end of the document, in list format. The list can be sorted later (with Tools, Sort) and used as a concordance file to help index the document.

Also see -

Blue bullet Marking selected words for an index, the traditional (manual) method of creating and generating an index; or download.
Blue bullet "How to Create an Index in WordPerfect" (87KB, PDF), which describes both the manual and concordance methods of creating indexes.

You might also be interested in -

Blue bullet The Table of Contents Feature - How to create a Table of Contents (TOC); How to mark a custom style for inclusion in a TOC.

Blue bullet Create a Glossary of Terms with the Index feature.

Blue bullet PageLine - A macro that produces a document Index with both page numbers and line numbers.

Blue bullet IndexList - A macro that is designed to process a one or more user-created lists of words or phrases in the current document and place page numbers after each item to indicate where in the document the item was found. Thus, it creates an Index from the List.

 

 

Unique.wcm (v2.02) - Creates a list of all the different ("unique") words in a document. The list can be used to help create a concordance file, which can then be used to automate the indexing of a document.
Download | Page Top

This macro creates an alphabetical list of all the different words found in a document. It copies one example of each of the different words to a second "concordance" document window which, in turn, can be saved and used to index the main document. The macro searches body text, and (optionally) footnotes, endnotes, headers, footers, and graphic boxes. Other options allow for excluding minor words, numbers, or including short phrases by marking them while the macro plays.

ABOUT CONCORDANCE FILES AND INDEXING DOCUMENTS

Normally, a concordance file is a separate WordPerfect file on disk that contains a list of the words or phrases that you want to add to an index in the current document [or, at a later time, in several (usually related) other documents].

When you generate an index, WordPerfect searches the document being indexed for occurrences of the words or phrases found in a concordance file, if one was specified. If the words and phrases in the concordance file are found in the document being indexed, they are automatically added to the index.

Thus, using a concordance file acts as an easily editable "source" of words and phrases you want to include in an index, and eliminates the need for manually searching for and marking index entries, one by one, inside the main or "target" document before generating the index. You can, however, use both a concodance file and manually marked entries at the same time when indexing the document. [For more on indexing, see WordPerfect's online help (F1), under "Creating an index."]

As indicated in the previous paragraph, you can mark word/phrases manually, directly in the body of the document to be indexed, in addition to -- or instead of -- using a concordance file. This manual method is the "traditional" method, and is often used with small documents. If you manually mark words and phrases in the current document file, you can also mark them as either index Headings or Subheadings. In an index, Headings are the main word or phrase indexed, while one or more Subheadings might be indented under the Heading. Some standalone index programs can create subheadings up to four or five levels deep. WordPerfect creates just two levels: Headings and Subheadings.

By default, each entry in the concordance file will appear as a Heading in the index. You need do nothing more if all you need is a simple index. However, you can edit the concordance file and mark any entry as a Subheading. You can even mark a concordance entry twice, for use as both a Heading and a Subheading.

Note that concordance file entries should be limited to 63 characters in length, or you will get an error message from the WordPerfect program when you try to use the concordance during indexing. Because of this WordPerfect-imposed limit, there is an option on the Unique.wcm menu to automatically trim entries in the unique word list to 63 characters (or fewer, if there are trailing spaces). Unfortunately, at this time the WordPerfect 11, 12, X3 and X4 shipping macro, Concord.wcm (see sidebar, left), does not do any such trimming. Therefore, you may be better off using Unique.wcm (it also sorts the list more robustly). It is otherwise identical to Concord.wcm in its functions. [TIP: Once the index is generated you can edit the index itself and manually modify any entry that you feel should be longer than 63 characters. Do this after the document is finalized, since any regeneration of the index will overwrite your edits.]

Finally, note these things about concordance files, whether generated by a macro like Unique or Concord, or created manually:

  • Capitalization: The generated index uses the capitalization of words in a concordance file, not the capitalization of the same words in the document. As WordPerfect's Help says: "...if you create a 'butterfly' entry in [a] concordance file, and generate the concordance with a document that also includes 'Butterfly,' all occurrences of 'butterfly' and 'Butterfly' are listed under the 'butterfly' [lower case] index heading." An option on the macro's menu lets the macro treat the capitalized and lower-case versions of a word as identical, producing just the lower-case version in the Unique word list; however, you may want to leave this option disabled if you want words like "smith" ("His father was a smith...") and "Smith" to be treated as different words, and thus have both appear in the Unique word list (and also in the generated index).
  • Hyphenation: The generated index uses the form of hyphen in the concordance file when it searches the document to be indexed. The two forms of hyphen that are most likely to be affected in indexing operations are the regular hyphen, created as a code ([-Hyphen]) when you press the hyphen key, and the hard hyphen, created by pressing <Ctrl+hyphen> (or by Format, Line, Other Codes, Hyphen character). Like hard spaces, hard hyphens are used to "glue" words or dates together so they will not be split across lines, and is the form used (at the present time) in the word lists produced by the Concord.wcm macro. (That is, the macro converts all regular hyphens to hard hyphens when it produces the word list that will ultimately become the concordance file.)
    • Therefore, when creating a concordance file manually, a word or phrase at a time, the safest methods to ensure hyphenated words are found in the document to be indexed when using the concordance during indexing are to either (1) first convert all regular hyphens to hard hyphens with Find and Replace, in the document to be indexed, or (2) use both forms of hyphen in the concordance file by simply creating two versions of each hyphenated item in the word list.
    • Both of the above are unnecessary with the Unique.wcm macro, because it creates the unique word list (i.e., concordance) with the form of hyphenated word (hard or regular) that is found in the document being processed.
    • However, always view the unique word list for duplicate hyphenated items before using it as a concordance file. In Reveal Codes, one of a pair of duplicate items may show hard hyphens, and the other may show regular hyphens. Retain both versions of that item to ensure both will be picked up in the main document during indexing; then edit the resulting generated index to remove the duplicate and consolidate that item's page numbers in the index list.

See also the Tips and Known Limitations sections, below.

ABOUT THE MACRO

The unique word list that is automatically created by this macro (as well as the same function now built into WP11/12/X3/X4's indexing feature -- see sidebar, left) is an ordinary WordPerfect document that can be used as a concordance file.

It will contain an alphabetical list of all the words (and certain desired phrases) that appear at least once in your document. Therefore, before using the concordance file you should delete items from the list that you do not want indexed, then save the edited file. (See the next section for more on this.)

In many if not most situations, automatically generating a concordance file, then editing it to remove unwanted text, can be much easier and more accurate than creating a new concordance manually, a word at a time -- while trying to recall which words should be included! [If you want to do it this way, open a blank document, type one entry per line (63 characters maximum per line), sort (with Tools, Sort) the final list, remove duplicate entries, then mark (with the "Mark" button) entries as Headings or Subheadings. Save the file to disk for later use in indexing.]

TO USE THE UNIQUE WORD LIST ("concordance file") to help generate an index, SAVE it first. Then -

  • As noted above, a comprehensive word list created this way should be edited to remove unwanted words.
    • Use your mouse or <Shift+Arrow keys> to select unwanted entries in the list, then press <Delete>. For long lists, you might want to save your edits often as you go through the list. (You can make several interim saves, each with a slightly different filename, with NewFN#.wcm in the Library.)
    • If the list appears to still contain many duplicate entries, you can save some time by playing the REMDUPES macro (see below) before editing the list to remove unwanted words.
  • After the list has been trimmed down to the words you want to appear in an index, mark any index Headings and Subheadings in the list as follows:
    • Click on Tools, Reference, Index. Select the word(s), click in Heading or Subheading and choose the word(s), then click Mark. (See also the subheading tip below.)
    • When finished, SAVE and CLOSE the concordance file.
    • Open the document where you want the index to appear. Position the cursor where the index will be placed -- usually at the end of the document.
      • Type a title for the index (e.g., "Index").
      • Press <Enter> one or more times to add blank lines after the title.
      • Click Tools, Reference, Index, then click the Define button.
      • In the Concordance File section, type (or Browse to) the concordance file's path and filename in the Filename box.
      • Click OK, then click Generate. [See WordPerfect's Help [F1] under "concordance" or press the Help button in related dialogs for more information.]

Page Top


Tips:

  • WordPerfect 8 and WordPerfect 10-X4+:
    • Be sure to read the message in the left column of this web page.
  • As mentioned above, you can use both a concordance file and manually marked words and phrases as Headings and Subheadings in the same indexing operation.
  • There are four ways to add phrases to the unique word list (see IndxHead.wcm below for a macro to automatically mark all paragraph style headings, which are usually phrases):
    • (1) Insert "hard" spaces between phrase words (i.e., [HSpace] codes entered with Ctrl+Space) in the main document, instead of normal spaces. The subsequent phrase will be picked up as a single item on the unique word list. Hard spaces are also useful when typing certain items such as salutations ("Mr. John Smith") to keep them one one line.
    • (2) Manually mark phrases. Choose the menu option, "Mark phrases before creating the list." The macro then will ask for confirmation, and pop up a small dialog box. You can click outside the dialog box and select (i.e., "mark") the phrase you want on your document. [WordPerfect 8 users: See the tip above.]
      • Normal navigation (mouse, PageDown, etc.) in the document can be used to find phrases. The macro will add each such phrase to a temporary "phrase file." When you are finished, the macro will resume processing the word list. Later it will include all your marked phrases at the top of the list.
    • (3) Automatically list capitalized phrases. If you select this menu option, the macro will search for adjacent words separated by a single space that are capitlaized or begin with a number. For example, "White House," "Channel 9 News." Note that if you also choose to manually mark phrases, you may get some duplicates in the unique word list if the macro selects the same phrase(s). [Also see "Known limitations..." below.]
    • (4) You can automatically list words enclosed in double or single quote marks by checking this menu option. In fact, the quoted material can be enclosed with any marks, either symbols entered with Ctrl+W or text characters entered from the keyboard. (Five marks maximum on each side. The boxes will scroll.)
    • The macro will add each such marked phrase to a temporary "phrase file." When you are finished, the macro will resume processing the word list. Later it will include all your marked phrases at the top of the list.
    • Each entry in a concordance file has a maximum size of 63 characters. This is a limit imposed by WordPerfect. If larger, you may get a WordPerfect error message, "Concordance Entry Too Large" (Corel Knowledge Base Article ID: 9729).
  • You can mark items in a concordance file as Subheadings in much the same way that you can (manually) mark Subheadings in the document to be indexed. For example, you might want to list the given names of several family members such as "Bill" and "Fred" under the same surname, "Johnson." By default, all concordance items are treated as Headings, but you can override this by manually marking some of them as Subheadings. Here's how.
    • In the concordance file, separate the words "Bill" and Fred" from "Johnson" if they are not already separate items. (The three items can appear anywhere in the concordance file, but it might help you to maintain some sense of order by putting them on adjacent lines. See the next tip below.) "Johnson" will become a Heading in the index, and the given names will become Subheadings.
    • In the concordance, select the word "Bill" to highlight it. Then click Tools>Reference>Index. Under the Index tab, set the Heading = Johnson, and the Subheading = Bill. (You'll have to type the word "Johnson" into the Heading field; the given name should then show in the Subheading field.) Click the Mark button, which will put an [Index] code in front of "Bill."
    • Repeat the previous step for "Fred."
    • Save the changes by saving the concordance file.
    • In the document to be indexed, generate the index. You should see the following items appear in the index:

Johnson. . .
    Bill. . .
    Fred. . .

    • If you want the names to appear in the index as "Johnson, Bill" and "Johnson, Fred" -- i.e., each item on the same line -- simply edit the generated index and change the text labels to the new format. Be careful to maintain the correct page numbers for each item. Note that you should do this only in the final draft; otherwise, re-generating the index will replace your changes.
  • Subheadings can be organized under their respective Headings in the concordance file. Here's a tip from Richard Bournes (posted on WordPerfect Universe, 02/06/05):
    • [In the concordance file] switch to draft mode (View,Draft).
    • Insert a comment which corresponds to the heading (Insert,Comment).
    • Create an index heading to agree with the comment.
    • Assemble and mark all your subheadings under each comment (also in alphabetical order) and keep the subheadings also in alphabetical order ([select] a group, then [use] Tools,Sort).
    • That way, all your headings are shown in a distinctive [color]; all the headings are in alphabetical order (if you do it that way) and all your subheadings are also in alphabetical order. This makes it all much easier to find and amend entries according to need.
    • The only trap is that when you have entered a heading as a comment, the temptation is to think you have ALSO just properly entered a heading under Tools,Reference,Index,Heading when, in fact, you may not have. [Make sure there's an actual index Heading in the concordance, not just a non-printable Comment, above the various Subheadings that relate to that Heading.]
  • Once you've created an index you may want to divide the index with capital letters. See ALPHADIV (a macro for this purpose) in the Library.
  • If you need multiple Indexes in a document, here is a post from Lindsay Rollo on WP Universe that explains how to do it. Basically, you should use just concordance files to create each Index, and not mark words for indexing with the manual method referenced above. Then you generate the first Index. Once generated, you select it and its bracketing codes (i.e., select everything from the [Def Mark] code to the ending [Gen Txt] code) and temporarily turn the Index into a WordPerfect Comment with Insert, Comment, Create. This "hides" the Index so you can generate the next Index. Repeat as needed for more Indexes. When you have finished, "unhide" the hidden Indexes by placing the cursor immediately after each of the [Comment] codes and click Insert, Comment, Convert to text. Naturally, all this should be done after the final draft of the document, or you might need to delete the Indexes and recreate them to ensure all items appear with their proper page numbers.
  • You can highlight the indexed words in your document by using the concordance file with the HiLiteDoc macro. Note that the HiLiteDoc macro won't highlight words that were manually marked for indexing, and it might get confused over "nested" marked-up words (i.e., both "John Smith" and "Smith" were marked), but if you used only a concordance file to mark your document it might help during final document editing. Highlighting can be removed with a macro in the same suite, or it can be removed with built-in WordPerfect feature, as explained at the bottom of the HiLite download page.
  • As noted above, concordance file entries (and manually marked document entries using the Reference Tools feature) are limited to 63 characters. However, once the index is generated you can edit the index itself and manually modify any entry that you feel should be longer than 63 characters. Do this after the document is finalized, since any regeneration of the index will overwrite your edits.

Known limitations and caveats:

  • Size of entries: Each entry in a concordance file has a maximum size of 63 characters. If larger, you will get a WordPerfect error message, "Concordance Entry Too Large" (Corel Knowledge Base Article ID: 9729). In version 2.0 of the macro, all items are automatically trimmed to limit entries to 63 characters.
  • Punctuation: Since most punctuation is stripped from the concordance document, some abbreviations and titles (e.g., "Mr.") with periods (full stops) followed by normal spaces will show up in the concordance without punctuation.
    • To work around this, you can: (a) use a hard space (Ctrl+Space) between the abbreviation and the following word; or (b) choose "Mark phrases..." from the main menu; this will allow you to select these words and "mark" them as phrases; or (c) edit the word list and add appropriate punctuation to the words after the macro plays.
  • Legal citations of the form "23.135(1)(g)(ii)" are stripped of their final parentheses. [This example citation would result in "23.135(1)(g)(ii" in the word list.]
    • To work around this, you can: (a) choose "Mark phrases..." from the main menu; this will allow you to select citations and "mark" them as phrases; or (b) edit the word list to add the missing punctuation.
  • Processing time: Because the macro has to compare each word on a preliminary word list with the next word on the list to eliminate duplicates, and perhaps go through the file more than once, processing time will vary greatly depending on the length of your document, the number of options you select, and/or the speed of your computer. Some documents may take many minutes to process. Please be patient.
  • Automatic listing of capitalized phrases (a menu option): Because the macro does not possess the intelligence of a human, it will sometimes choose a capitalized word (or words) from the beginning of the following sentence and include it with the current capitalized phrase. (That is, it won't see end-of-sentence punctuation.) Simply be aware of this when you edit the word list. Such phrases are placed at the top of the word list for easy editing.
  • Please note that the purpose behind this macro is to create a document that contains words and phrases that can be helpful in creating an index. There are absolutely no guarantees that it will work or be 100 percent accurate when played in a given document. While it has be tested on a variety of documents in several versions of WordPerfect, there is no way to test for everything (including damaged/corrupt documents) that could impact the words selected and listed.

Caps2End.wcm (v1.01) - "Send Capitals to the End of the document"
Download | Page Top

This macro locates all words with initial capital letters in a (usually) sorted list and either copies or moves them to the end of the list.

This is a companion macro to Unique.wcm, when Unique is used to create a comprehensive list of all the different words in a document (for indexing purposes) and the user selects the proper menu choice in Unique to create the list while preserving capitalized items.

It can, of course, be used standalone on any list of words.

WordFreq.wcm (v1.02) - "Word frequency"
Download | Page Top

This macro produces a word frequency count -- i.e., the number of times each different word appears in a document.

This is a companion macro to Unique.wcm, when Unique is used to create a comprehensive list of all the different words in a document.

 However, the WordFreq macro depends on the following three pre-conditions:

1. Play the author's UNIQUE.WCM macro on the document you want to analyze. Use the default menu choices on the Unique macro's menu -- particularly "Treat all capitalized words as identical to their lower case counterparts." Following the playing of Unique, a dialog will ask if you want to remain in the current (unique words) document. Reply with "yes." You should now have an alphabetical list of all the different words in the document, in a separate document window.

2. Copy the alphabetical list of words to the very bottom of the document you want to analyze. You can go to the bottom of that document first, then enter a hard page break with Ctrl+Enter, and then paste the alpha list at that location. Or, if the list was saved to disk beforehand, you can use File, Insert to place the alpha list at the bottom of the document just after the page break.

3. Position the cursor at the beginning of the first line of the alphabetical list in the document you wish to analyze. The macro will start processing at that location, and it will examine the document and type the count of each word next to that word.

Tip: If you copy the newly annotated alphabetical list to a new document window, you can sort the document (with Tools, Sort) by the first word (the count) to give you and ascending (or descending) frequency count.

Known limitations: The macro will enter a "0" count next to hyphenated words. Due to a limitation in the macro language, the Search routine cannot store hyphenated words found during processing. This can be overcome if the soft hyphens are replaced with hard hyphens before creating the unique words list.

Notes: The code for this macro is relatively simple and could be incorporated into the Unique.wcm macro; however, very few users have asked for a word frequency count feature, and unless more requests are made there is no plan to do so.

RemDupes.wcm (v1.03) - "Remove duplicates"
Download | Page Top

This macro is designed to remove duplicate items from a list of items. You can also use it to consolidate several concordance files into one concordance with no duplicate items.

Please be aware that RemDupes.wcm is (mostly) a subset of the macro code in Unique.wcm. Therefore, you may want to read the Tips for Unique.wcm (above) before playing this macro.

Version 1.02 adds code to trim each line to remove any leading or trailing spaces, and to sort the file on up to nine words in a single line (field), the maximum allowed. The latter should improve results in files with many similar phrases. Thanks to Alex DeVolpi, co-author of Nuclear Shadowboxing, for prompting this enhancement.

Notes:

The list should be in a document with no other text. Each line in the list must end in a hard return. The list does not need to be sorted first; the macro will sort the list alphabetically. Also, you should not format anything before playing the macro. All words and phrases should be in plain text, and in one continuous column.

If you wish to combine several lists and remove duplicate entries from the final, consolidated list:

(1) open a new document;

(2) copy and paste (or use File, Insert) to place each list at the bottom of the new document; if you paste, you might get better results with some documents if you use Edit, Paste Special, Unformatted text to remove any formatting

(3) save the newly combined list to disk for future use;
(4) if the combined list is not already onscreen, open it in the current window ;and

(5) play the macro.

Tips:

  • To restore the newly combined list to the way it was before playing the macro, simply close the document without saving it (File, Close, No).
  • (Note: Version 1.02 adds code to perform a multi-key sort on the list. If you are using an earlier version you can perform such a sort manually, as explained here.)
    • If you have lots of phrases that do not seem to sort properly or that seem out of sequence, you can sort the file on the first word on each line (the first "sort key"), then, for each phrase that starts with the same word, sort on the second word ("Key 2"), etc. Here's how:
    • Use Tools, Sort, New and create a new user-defined sort with added keys (press the "Add Key..") button. The new sort keys are just like the first sort key, but with the Word field incremented for each new key in the sort. That is, Word 1, Word 2, Word 3. If you have 4-level deep words you want sorted by the fourth level, create 4 keys, etc.
  • Words or phrases have to be exactly the same to be considered "duplicates" by the macro. Version 1.02 automatically removes any leading or trailing spaces (soft or hard) from each line in the list, because such spaces adjacent to an earlier word or phrase would cause the macro to treat the next item -- if it has no such spaces -- as not identical. But if "identical" words or phrases seem to appear next to each other, use Reveal Codes to verify that they are indeed duplicates.

IndxHead.wcm - "Index headings"
Download | Page Top

This macro marks the first 64 text characters in standard and custom paragraph styles in the document for indexing (typically, these are section headings formatted with such styles as Heading 1, Heading 2, MyHeading, etc.) .

It is useful if you have marked (or will mark) words in a document manually for indexing, and want to ensure that paragraph style headings (i.e., short text headings formatted with a paragraph style) are also included in the index. The macro adds an [Index] code to the beginning of most paragraph styles (see exceptions in Notes and Limitations, below).

It was designed to be use used as a "stand-alone" macro. However, you probably don't need to use it if the Unique.wcm macro (see above) was used with the "mark phrases" option enabled and you marked all phrases while playing Unique (including all heading phrases). But since most headings are usually phrases anyway, it may be easier to use this macro first to mark all headings (if they were first formatted as paragraph styles) for indexing; then play Unique and skip the (now) marked heading phrases. See the macro's limitations below.

Notes and limitations:

  • Due to limitations in the WordPerfect program, only the first 64 characters will be marked in each paragraph heading found. You may need to edit the index to remove partial "trailing" words from some longer entries.
  • Items found in Outlines will be skipped. (These are not generally considered to be 'headings' even though they are paragraph styles.)
  • Text/graphic boxes are also skipped, along with anything inside a 'substructure' (footnote, endnote, header, footer, comment, etc.).
  • Items in a Table of Contents will be processed (which is generally not desirable) unless the cursor is placed below the TOC before playing the macro, and the 'Start at current cursor location' option is chosen. (A warning is always given that a TOC is present.)
  • If an [Index] code is already present in a paragraph style, the macro will pause and present processing options (add a new code, skip the current item, or quit). Generally, no harm is done if more than one [Index] code exists in a paragraph style if they mark the same text characters. If they do not, each differently marked item (for that particular heading) will show as a separate line item entry in the index.
  • If an Index has already been generated in the document, a warning will be given to allow exiting the macro and deleting the Index, which can be regenerated later after the macro plays. Otherwise, Index entries will be marked with [Index] codes if they contain custom paragraph styles (i.e., styles other than the standard Index1 and Index2 styles). This can create duplicate Index entries.
    An alternative is to click the Generate button on the Index property bar again after the Index is generated. This seems to clear out any unwanted [Index] codes in the Index itself.
  • Document ("open") styles and Character styles are not processed, nor are simple text "headings" that are not formatted as a paragraph style. These text headings can, however, be included as a phrase when playing the author's Unique.wcm macro. They will then become part of a concordance file that can be used to index the document.
  • Not tested in WordPerfect 7 and earlier versions.

IndxWord.wcm - "Index word(s)"
Download | Page Top

This macro marks the selected word(s) or (if nothing is selected) the word at the cursor location, as an index entry (i.e., as an index Heading item).

It is useful if you have just a few words to add to the index and don't want to bother with Tools, Reference, Index, <select words>, <click in the Heading field on the Index property bar>, Mark. This macro does all of that for you; however, it does not let you create a Subheading (you must use the Index property bar for that).

Notes and limitations:

  • Due to limitations in the WordPerfect program, only the first 64 characters will be marked in each block of selected text. You may need to edit the index to remove partial "trailing" words from some longer entries, or -- better -- just select a shorter string of text before playing the macro.
  • If no word is selected at the cursor location, the macro will simply terminate.
  • As mentioned above, the macro does not let you create a Subheading (you must use the Index property bar for that). It creates only Heading entries.
  • Assign this macro to a keystroke combination for easy access while editing the document.
  • You can delete the message that pops up by deleting the redlined code in the macro.
  • Not tested in WordPerfect 7 and earlier versions.
  • You can mark a concordance file:
    • From WordPerfect 12's online Help <F1>:
    • "...By default, each entry in the concordance file appears as a heading in the index. However, you can also mark an entry as a subheading. The capitalization you used in the concordance file, not the capitalization in the indexed document, determines how the index entries display once you generate the index.
    • When you mark an index entry manually, you must designate it as either a heading or a subheading entry....
    • To mark a heading or a subheading in a concordance file
      • 1 Select a word.
      • 2 Click Tools Reference Index.
      • 3 Choose the selected word from any of the following list boxes:
        • · Heading
          · Subheading
      • 4 Click Mark.
    • Tip: You can mark a concordance entry twice, for use as both a heading and a subheading."

TrimTo63 (v1.01) - Trim concordance items to 63 characters
Download | Page Top

This macro is designed to be used with an existing concordance file that was created by means other than the author's Unique.wcm macro. (Unique will do all trimming during the creation of a concordance.)

Operation: It examines all items in a concordance and trims any items that exceed 63 characters (including spaces) to 63 characters/spaces.

Reason: Items longer than 63 characters will cause an error message if the concordance is used in WordPerfect to help index a document.

Caution: All items in a concordance should be "plain text" and not contain format codes (bold, italics, columns, tables, etc.). Each item should be on a separate line, each ending with a hard return.

Tips:

  • You can use the author's RemDupes macro to sort the concordance and remove any duplicate items.
  • Always make a backup copy of the concordance before playing this macro.

[This macro is based on a code segment in the most recent versions of Unique.wcm.]

ListWord - Copies word(s) to the end of the document in list format
Download | Page Top

This macro copies the selected word(s) or, if nothing is selected, the word at the cursor location, to the very end of the document, in list format. The list can be sorted later (with Tools, Sort) and used as a concordance file to help index the document.

This might also be handy if you just want to review the file and list some words or phrases that should be available for future indexing by adding them to an existing concordance file.

Operation: You should ensure the list is placed on a separate page by entering a page break at the bottom of the document with <Ctrl+Enter> before playing the macro.

After the list has been created you can remove duplicates (and automatically sort the list) with the RemDupes macro.

Note that if the word list is to be used as a concordance file, entries must be limited to 63 characters (including spaces) or else WordPerfect will fail to produce the concordance. You can use a variable in the macro's redlined User Modification Area to ensure the selection is trimmed to this maximum length. (Default = trim to 63 characters)

You can also set a variable to display or not display the confirmation message that appears immediately after the items are copied. (Default = display the message)

Tip:

  • You can assign this macro to a keystroke combination or toolbar button for easy access while editing the document. See here.

Page Top

Marking selected words - the traditional (manual) method of creating and generating an index

As mentioned above, you can use the manual-marking method by itself or in conjunction with a concordance file to create (generate) an index for your document. (The following material is also contained in How to Create an Index in WordPerfect, a downloadable PDF file.)

Basically, you -

  • select text (words, short phrases) in a document, then
  • click in one of the two fields in the Reference Tools dialog (in WP10 and earlier versions it is a toolbar, not a dialog) which appears when you click Tools, Reference, Index; this dialog (or toolbar) should be on screen before you begin marking text for the index. Then you
  • mark the entry. Finally, you
  • define and generate the index, typically beginning on a new, empty page at the end of the document.

Step 1. Mark words and phrases

  • Click on Tools, Reference, Index.
    • In WP10 and earlier, this places a toolbar at the top of the screen. In WP11 and later, this opens a floating Reference Tools dialog (the floating dialog can be docked at the top or bottom of the WP window, though it takes up more space than the old toolbar).
  • Select the text for the index entry with your mouse or keyboard. In most instances this will not present a problem; however, as noted above, the selection should be limited to 63 characters, including spaces. Extra characters beyond this limit will be truncated in either of the Reference Tools dialog fields (see next paragraph). [However, once the index is generated (see Step 2 below) you can edit the index itself and manually modify any entry that you feel should be longer than 63 characters. Do this after the document is finalized, since any regeneration of the index will overwrite your edits.]
  • Click in the Heading or Subheading field of the Reference Tools dialog (or toolbar, in earlier versions); WordPerfect will insert the selected text in the field. If you are marking the text as a Subheading, type the heading in the Heading field (or use the Heading field's down-arrow button to choose an existing heading).
    • You can modify the text in the Heading or Subheading field. When the index is generated the index entry in the Index area of your document will reflect the modification, but the actual item in the body of the document will not change. This can be useful if the selected text in the Heading or Subheading field isn't as meaningful or as descriptive as you would like it to be for that particular material, or if you would like to add punctuation marks. (The index code that is placed in the document when you mark the item [see below] will contain the revised text descriptor, as you can see by placing the cursor in front of the code in Reveal Codes, but the location of the code in the document will be the same as when you selected the item.) Be sure to limit any entry in these two fields to 63 characters, including spaces.
      • Note that starting with WordPerfect 11, selecting normally hyphenated words (i.e., words separated by a [- Hyphen] code which is inserted when you press the hyphen key) produces a Heading or Subheading label with a symbol (€) instead of a hyphen. Simply delete the symbol and replace it with a normal hyphen. Both the index entry and the word in the document will then be identical.
    • If you have one or more Subheadings marked under a particular Heading, the generated index will list page numbers for the Subheading(s) only.
    • TIP: In the Subheading field (at least), keep the Subheadings relatively short, or else WordPerfect might insert line breaks ([Ln Brk]) on the Index page when it is generated, causing Subheadings to break apart from their dot leaders (the dots that separate the Subheadings from their page number(s)).
  • Click the Mark button. This inserts an Index code in the document at the beginning (in front) of the word or phrase.
    • The next time you need to mark this word or phrase in the document, you can just place your cursor in front of the next instance and then choose the word or phrase from either the Heading or Subheading drop list, then click Mark. (You can, of course, select it as you did before.)
    • Index entries are case-sensitive. A separate entry for each word is inserted into the index for each variation of the word you mark, resulting in multiple entries for the same word.

Step 2. Define and generate the index

You must define and generate the index for it to appear at the end of your document.

  • Move to the end of the document and press <Ctrl+Enter> to create a new page.
  • Type a heading at the top of the new page (e.g., "I N D E X").
  • In the Reference Tools dialog (or toolbar, in earlier versions), click the Define button on the Index tab. The Define Index dialog will appear.
    • [NOTE: If you cannot see a Define button in the Reference Tools dialog, see Footnote 1 below.]
  • In the Define Index dialog, you can change the Position and Page Numbering. If you click Change, you can edit the index styles.
  • If you want to use a concordance file (by itself or in addition to any previously marked words), type the concordance's filename in the Filename field (or use the folder button to the right of the field to browse for the concordance file).
    • [NOTE: The Create button in WordPerfect 11+ is WordPerfect's way of letting you create a concordance file. It "calls" (plays) the Concord.wcm macro, as explained in the left column on this page. But you may want to use the Unique.wcm macro above, instead.]
  • Click OK. WordPerfect will insert an index code and a temporary marker at the cursor location ("<<Index will generate here>>").
  • Click on Generate. A small dialog will appear that lets you save any changes to subdocuments (if any) or build hyperlinks (if any).
  • Click OK. The index will be generated.
    • TIPS:
    • Be aware that the Index in a WordPerfect document is simply text formatted with special paragraph styles and hyperlinked page numbers. (Look at the Index in Reveal Codes.) Therefore you can format the Index into columns with a smaller font size, manually add/remove/edit punctuation or text, and even add large capital letters to divide each section of the index (see ALPHADIV to help with this). But if you re-generate the Index, your edits there will be lost, since everything between the [Gen Txt] codes will be replaced. So, it is better to do such formatting and editing on the final draft of the document.
    • Check the index for errors, misspellings, etc. It is easy to overlook this step.
    • For more advanced topics and tips, see an after-market book such as Using WordPerfect 12 or Using WordPerfect X3 by Laura Acklen and Read Gilgen (QUE Books).

Page Top

Create a
Glossary of Terms
with the Index feature

Since the Index feature creates an alphabetized list of previously marked (coded) words in document, you can use the Index feature to create a Glossary by simply formatting the resulting "index" differently. You can even use the Index feature again in the same document to create a regular Index.

  • Index the words as you write (or later during editing) by marking them manually as described in the previous section.
  • Use either one of these options (not both):
    • Option 1: If you have not yet generated the Index: When you generate the Index, it normally will create a section of text with page numbers after each Index item. However, in this case -
      • position the cursor where you want the Glossary to appear;
      • click Tools, Reference, Index, Define;
      • choose "No Numbering" in the Define Index dialog's Position drop list;
      • click OK;
      • back in the Reference Tools dialog, click Generate (or generate later with Tools, Reference, Generate).
    • Option 2: If you have already generated the Index you can simply double-click on the [Def Mrk] code in Reveal Codes. This brings up the Define Index dialog (as in Option 1 above).
      • Choose "No Numbering" in the Define Index dialog's Position drop list.
      • Click OK and Close to return to the document.
  • You should now have an alphabetical list -- without page numbers -- to use as a Glossary.

IMPORTANT: If you need to actually index the document after creating the Glossary, be sure to delete the bracketing Index codes (see below) around your Glossary so that it becomes a plain text list. Otherwise, you will have your Glossary overwritten by the subsequent Index operation. Here's how:

  • In Reveal codes, locate the [Def Mrk][Gen Txt] codes at the beginning of the Glossary and delete them; this leaves just the index's paragraph style codes around each Glossary item. They should do no harm, but ...
  • To quickly remove the index style codes around all Glossary items, select the entire Glossary and click <None> in the Styles list on the property bar (or click Format, Styles, <None>, Insert). This should remove the paragraph style codes, leaving a "plain text" list of terms.

Then create a new, comprehensive Index. You could use (and maintain) a concordance file for just the Index items, to keep the (manually marked) Glossary items separate from the rest of the to-be-indexed items during document creation and editing. Since you can use both a concordance and manually marked index terms when you generate an Index, you can have a Glossary [from the manually marked items] and an Index [from the combination of manually marked items and the concordance].

   

Footnote 1

If you cannot see a Define button in the Reference Tools dialog and you are using Windows XP, it might be because Reference Tools dialog has been “truncated.” There's a setting in Windows XP that might be causing the problem. Right-click on the Windows desktop, then click Properties (or click the Start menu, Settings, Control Panel, Display). Click the "Settings" tab, then click the "Advanced" button in the lower right-hand corner of that tab. Under DPI setting, make sure the drop-down displays "Normal size (96 DPI)" rather than "Large size (120 DPI)".

Some users have reported they can increase the setting beyond 100% (96 DPI). For them, at 117% all buttons on the Reference Tools dialog's T.O.C. tab are present; at 118% the bottom buttons are missing because the dialog is truncated.

Note that in some situations increasing the DPI will make the numbers on your WP ruler invisible. This is a known issue.

If you still need to increase the size of dialog (and other Windows elements) text, here's a tip from Charles Rossiter (Corel C_Tech):

"Instead of changing the dpi, you can edit the display settings through Windows Start, Settings, Appearance tab, Advanced button. Click on item, and you get a list of about 20 items. Go through that list and increase every font size by 2 points (as a starter example).

If you increase the size of the characters that way, without changing the dpi, you will not lose the ruler measurements, nor disrupt the reference tools dialog."