Unique.wcm, v2.03, 10/28/09;
Caps2end.wcm, v1.01; 01/11/08;
WordFreq.wcm, v1.03; 10/28/09;
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
ZIP file total = 159,657 bytes
Compatible with WordPerfect 8 and later
WordPerfect 11 users: See important information about using macros in the first
release of WP11 (184.108.40.206) at the top of this page.
Documentation, Modifications, and Support
and later versions
WordPerfect Office 11 and later
versions (except trial editions) are shipped with a special 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).
Update (as of Sep 27, 2010): The
automatic concordance feature in WordPerfect apparently does not work
to automatically generate a concordance on Windows 7 systems, but it does work
on Windows XP systems. However, the Unique.wcm macro will work
under both versions of Windows.
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.
See also the
information here about using macros (from any source, not just this website)
in WordPerfect 220.127.116.11 (i.e., the initial release) and 18.104.22.1680
(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
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/X5 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/X5 (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.
| 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
[Note that menu choices
on this page refer to the <WordPerfect>
menu (right-click on the top menu bar for a choice of menu). If
you use a <Microsoft Word> menu, the choices might be absent from
your menu (but not from the program), or they might be found under
another menu selection. See here
information . . .
IndexDocs.html - "Indexing documents with WordPerfect" - The traditional manual method and the concordance file methods of indexing. Contains much of the same material as found in
"How to Create an Index in WordPerfect"(PDF), plus many tips and a section on creating a glossary.
Descriptions of the
macros in the UNIQUE.ZIP suite . . .
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.
[Update (02/08/2012): See
the new WordList.wcm macro, which is similar to Unique, but it can also
create a frequency list.]
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.
WordFreq.wcm - A macro that produces a word frequency count --
i.e., the number of times each different word appears in a
(02/08/2012): See the new WordList.wcm macro, which is similar to
WordFreq, but it can also create an alphabetical list that can be
used as a concordance file.]
RemDupes.wcm - "Remove duplicates" - This macro is designed to remove
duplicate items from a list of items. [See notes in the section below.]
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.).
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).
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
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.
You might also be
interested in . . .
The Table of
Contents Feature - How to create a Table of Contents (TOC); How
to mark a custom style for inclusion in a TOC.
Create a Glossary of Terms with the Index
PageLine - A macro that produces a
document Index with both page numbers and line numbers.
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.
- A ZIP file containing a PDF document and three macros by New Zealand
author Lindsay Rollo.
(v2.03) - 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.
| Page Top
Recommendation: Download the new dual-function WordList.wcm
macro, which is similar to Unique but it can also create a sorted
frequency list of all words that appear at least once in the document,
as well as a plain alphabetical list like that created by Unique.wcm.
WordList.wcm should more reliably preserve hyphens, hard spaces,
en-dashes, and WordPerfect symbols (from the Insert, Symbol feature)
than Unique.wcm. This is because it uses a different method of removing
format codes. (Over the years, Corel has made modifications to the
that cause certain macro commands to automatically change or remove
some format codes and
symbols. WordList's method preserves the above items in the final
not modify the current document in any way, since everything is done in a new document window.
does not automatically preserve Capitalized Phrases like Unique.wcm
does, nor does it let you stop it and edit the document to capture your
own phrases. But you can always use hard spaces (Ctrl+spacebar) in the
document to "glue" selected phrases together (see also HSpacer.wcm), or else use the Clipper.wcm macro
to copy selected phrases into a separate document, which can
later be combined with a comprehensive alphabetical
list created with WordList.
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.
For more on using the concordance
file method of indexing a document, see Indexing with Wordperfect.
See also the Tips and Known Limitations sections,
About the Unique.wcm 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/X5'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 as a
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
- 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
- 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.]
(see also Known Limitations and Caveats below)
- WordPerfect 10 and later versions
(and WordPerfect 8): Be sure to read the message in the
left column of this web page.
- Index codes: 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. If you use a
concordance file, when you generate the index WordPerfect will add
[Bookmark: Hyperlink] codes (in Reveal Codes) next to the
concordance items found in the document. If you manually mark words
using the Reference Tools dialog (as explained below),
when you generate the index WordPerfect will add [Index] codes next to
- Both types of indexing code can be globally removed in the document: Place your cursor
at the top of the document and click Edit, Find and Replace; while your
cursor is in the "Find" field in the Find and Replace dialog, select
Match, Codes... on the dialog's menu and then choose "Index" (or
"Bookmark" -- but see below for more) from the list
of codes that appears. Finally, choose <Nothing> in the "Replace
with" field and then click Replace All.
- If the [Index] codes
are replaced with <Nothing> to globally remove them you will need
to mark those items again in the main
document, since removing these codes will also "clear" the Heading and
Subheading drop lists in the Reference Tools dialog.
- For longer documents with
lots of index entries, it might be better to use a concordance file to
re-index the resulting "clean" document. The Unique.wcm macro can help
create the concordance.
- Alternatively, you can
re-use an existing generated index as a concordance file by copying the
index entries -- which are simply text formatted with special styles --
into a new, blank document and pasting them there with Edit, Paste
Special, Unformatted text. It might be helpful to generate a "text only" version of the index before
copying it. A little careful editing of the copied index, taking into
account the tips and caveats elsewhere on this page, should produce a
workable concordance file that can be saved to disc and used to
re-index the document.
- If the [Bookmark: Hyperlink]
codes are replaced with <Nothing>, the concordance file will
automatically replace them when the document is generated again. Caution:
Replacing [Bookmark: Hyperlink] codes this way will replace all
other [Bookmark] codes, too. Normally, there is little reason to remove
these concordance-generated codes en masse, unless you are sure
no other important bookmarks exist (see Tools, Bookmark).
- 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..."
- (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.
If you want people's 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 entries to the new format. Then select
and re-sort the index area with Tools, Sort. (Be careful to maintain
the correct page numbers for each item.)
You should do this only in the final draft; otherwise, re-generating
the index will replace your changes with standard index
It might be a good idea to copy the generated index to a new blank
document for additional editing, then copy it back in place when you
tip: You can automate multiple-item searches with a macro such
- 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
- 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
- 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
- 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
- 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.
- You can use a generated
index as a concordance file (or add it to an existing concordance
file) for future use with other documents: Simply generate the index
using "text only" items (i.e., no page numbering, just the index
- First, make a backup of the
document. Then ...
- If the index already exists, you can double-click the [Def Mark] code at the
beginning of the index and for the Numbering Format Position, use "No
Numbering." Then click OK, then Generate the document.
- If the index has not yet been
created, make the same "No Numbering"
choice (as in the previous step) when you generate it.
- Then select and copy the
numberless index into a new document (i.e., everything between the
[Def Mark][Gen Txt]...[Gen Txt] codes, which bracket all
indexes). Then save that document, which can be used as a concordance
file (or combined into an existing concordance file, and the result
sorted with Tools, Sort.)
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.
- Number of entries: The WordPerfect program (at least up to WPX4 (build
22.214.171.1246)) may limit the number of items it can sort to 32K
of memory. This seems true of paragraph sorting, and may be
true of line sorting -- the type that is used by the Unique
(and RemDupes) macro. Until (and if) this issue is addressed by Corel,
you should break apart large documents into, say, 20-25 pages per block
and play the macro on each section separately. You can then manually
combine the lists with Insert>File, but you will need to remove
- 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
- 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.
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
(or WordList.wcm), when that macro 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 the macro to create a list while preserving capitalized items.
Caps2End can, of course, be used
standalone on any list of words.
is a macro that simply trims out all lower case items from any
list created in a separate document (such as a concordance file),
leaving behind just those items with one ore more upper case letters,
regardless of where the upper case letter is in the item. This might be
useful to isolate names, proper nouns, acronyms, etc.
is a macro I posted on WordPerfect Universe that creates a list of
words composed of ALL CAPITALIZED (i.e., upper case) letters.
- "Word frequency"
Download | Page Top
Download the new dual-function WordList.wcm macro, which is
WordFreq.wcm, but it can also create an alphabetical list that can
as a concordance file.
also is easier to use, since
it does not depend on playing any other
macro first and you do not need to manually copy anything back into the
In fact, WordList does not modify the current document in any way,
since everything is done is a separate document window.
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 success of
the WordFreq macro depends on following three steps:
Step 1. Play
the Unique.wcm macro (see above) on the document you want to analyze.
Use the default menu choices on the Unique macro's menu -- particularly
be sure to uncheck (disable) "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
Step 2. Copy
the new 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. Remove all
phrases from the list: the list must consist of single characters
or words, one per line.
Step 3. Position
the cursor at the beginning of the first line of the
alphabetical list in the document you wish to analyze. Play the
WordFreq.wcm macro. The macro will start processing the list at
that location, word by word, examining the document to find matches. It
will then type the total count of each word next to that word.
If you copy the newly annotated
alphabetical list (from Step 3) to a new document window, you can sort
the document (with Tools, Sort) by the first word (the count) to give
you an ascending (or descending) frequency count.
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.
- "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
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
- The list should be in a document with
no other text.
- Each item in the list must end in a
hard return (that is, each item cannot span more than one line
on the screen).
- The list does not need to be sorted
first; the macro will sort the list alphabetically. (But see "Known
Limitations" above for the Unique.wcm
macro: the number of items in a list might be limited in sort
- 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:
- open a new blank document;
- 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;
- save the newly combined list to disk
for future use;
- if the combined list is not already
onscreen, open it in the current window; and
- play the macro.
- 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.
- "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
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
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
- "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
- You can mark a concordance
- From WordPerfect 12's online Help
- "...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
- 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:
- 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
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.)
The macro examines all items in a
concordance and trims any items that exceed 63 characters (including
spaces) to 63 characters/spaces.
Items longer than 63 characters will
cause an error message if the concordance is used in WordPerfect to
help index a document.
All items in a concordance must be
"plain text" and not contain format codes (bold, italics, columns,
tables, etc.). Each item must be on a separate line, and each must end
with a hard return.
- 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 itself can be selected,
then sorted with Tools, Sort. 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
Optionally you can move (cut and paste)
the list into another document where duplicates can be removed, the
file can saved, and then used later as a concordance file to help index
the document. See Operation below.
You should first 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. This
ensures a separate list will be created.
As noted, after the list has been
created you can move (cut and paste) it to a new document window.
There, you can remove duplicates (and automatically sort the list) with
the RemDupes macro.
Once you remove duplicates and save the
list to disk, it can be used as a concordance file to help generate an
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
use the TrimTo63 macro above.
Finally, 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)
- You can assign this macro to a
keystroke combination or toolbar button for easy access while editing
the document. See here.