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

Barry MacDonnell's
Toolbox for WordPerfect

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

Page updated Nov 18, 2025

WordPerfect Tips
Main tips page | Browse more tips

How to create
WordPerfect Lists

How to create a List

Some tips

How to create custom styles to help automate creating Lists (and solve a few problems, too!)




Related pages -

To create a Table of Contents see here.

To create an Index or a Glossary see here.

To create a Table of Authorities see Corel's support database article #3524 here and also this post at WordPerfect Universe (which references CiteLink and FullAuthority). [Update: See Corel's Perfect Authority for sale at http://www.corel.com (also included in the Legal Edition). There is a tutorial on using Perfect Authority here.]


 




Overview

Note: This very useful and easy to use feature is available in most versions of WordPerfect (see Tools, Reference, List). But because the word "list" can mean several things in WordPerfect, my guess it that it is no longer documented in the User Guides and Help modules of modern WordPerfect versions — even though it has existed for many years.

WordPerfect Lists
are similar to a Table of Contents (TOC), since their items are also associated with page numbers in the document.

Example:

Apples . . . . . .5
Bananas . . . . 7
Oranges . . . . 12

Note

To create automatically numbered lists at the current cursor location like this -

1. Apples
2. Bananas
3. Oranges

- or to create bullet lists, see the Automatic Numbering and Bullet feature, which is different from the List feature described below.

List items

•  Single words, phrases, or paragraphs
•  Captions in graphic images or photos
•  Beginning locations of several pages of text

General method

•  The items are first marked with special format codes as explained below (a simple select-and-click operation), then you
•  generate the List to update page numbers in the List.

Advantages

•  You can place the List wherever you want in the document.
•  More than one List can exist in the document. Each List can be different from other Lists, and can be easily updated as needed.
•  A Table of Contents in a document can reference one or more Lists — they are not mutually exclusive.

How to create a List

Here are the basic steps to create and generate a List. Please read them before using them.

Step 1.

Select the text you wish to include in the List as an entry on the list.

Notes and tips

•  Unlike creating a Table of Contents automatically by using WordPerfect's factory shipped Heading styles, you must manually select text to include in the List. There are no special, internally marked styles included with the program for a List as there are for a TOC (i.e., the Heading styles).

•  Generally, the selected text should be in the body text area of the document or in the Caption area of a graphic image or photo, and not in a "substructure" such as a header, footer, footnote, endnote, etc.

•  Be careful not to include format codes (Bold, Italic, etc.) in your selection unless you want the formatting to appear in the List. You can check Reveal Codes while you select text. (Shift+arrow makes it easier to be precise when selecting items in Reveal Codes.)

However:

•  For image or photo captions, where you want to include both the Figure number and the caption's text in the List: Carefully select both the [Open Style: FigureNum] style code and the caption's text (i.e., both in the same selection). This is most easily done using Shift+arrow in the Reveal Codes window.

•  You can also select just the text in a graphic's Caption. The caption will then show up as an entry in the List along with the page number where the graphic is located.

•  Alternatively you can select just the [FigureNum] code in the caption if you want just the Figure number to appear in the List.
    Step 2.

    Choose Tools, Reference, List. This opens the List tab on the Reference Tools dialog.

    Name the List to use:

    If the List has not yet been created,
    you can give it a name directly in the List: field.

    If you have already created and named a list: Choose the desired List's name in the List: field with the down arrow button.

    Alternatively, you can click the Define button on the Reference Tools dialog, then click Create in the Define List dialog that appears. In the Create List dialog give a name to the new List, click OK, then Close.

    Tips

    •  See the tip below on formatting page numbering in a List using the Define, Create or Define, Edit buttons.

    •  You can also Retrieve an existing List definition from a document that has the definition you want by using the Define, Retrieve button.
    Step 3.

    Mark the List's entries: With the List dialog still on screen — click on the [Mark] button. This puts a paired code around the previously selected text in Reveal Codes, like this:

    [Mrk Txt List: <List name>}Cost estimates for the project{Mrk Txt List: <List Name>]

    ... where <List Name> is the name you used in Step 2 above.

    Repeat this step as needed: Select other text to include in the List, clicking the Mark button for each selection.

    Tip:
    Using special marking codes to create a custom List is the traditional method to create a List, but it is not the only way: See the last item in this section below on using a small macro to create a custom List from your selected text items as you edit the document. That way the maco will add the marking codes for you, and so you can skip this Step 3 (and maybe even Step 2 above.)

    Related Tips

    •  This step can also be done later, even after the List has been created — but be sure to re-Generate the List (Step 4(d below) whenever you add or delete marked items (or the marking codes around them).

    •  Reminder: If you have multiple Lists in the document (see tip below), be sure to choose (click on) the desired list name in the List field before you mark text in the document.
    Step 4.

    When you are done marking items (N.B.: You can mark more items later, then return to Step 4(d)) -

    (a) Place your cursor where you want the List to appear in the document.

    (b) Define the List with the [Define] button on the Tools, Reference, List dialog.

    When the Define List dialog appears -

    (c) Insert the code that will create the List with the [Insert] button. This places format codes ([Def Mark][Gen Txt]) and a text placeholder
    (<<List will generate here>>) in the document, like this:

    [Def Mark][Gen Txt]<<List will generate here>>[Gen Txt]

    Tip: You can use [Edit] to change the style of List entries in a similar manner to a Table of Contents (see here and the tips below).

    When the Define List dialog closes -

    (d) Generate the List with the [Generate] button on the bottom of the Reference Tools dialog (or via Tools, Reference, Generate)

    Be sure to enable the "Build hyperlinks" choice on the small Generate dialog that appears if you want the page numbers in the List to be hyperlinked.

    Then click OK, then Close to return to the document.

    The List should now display all items you marked for that List in Step 3.

    (Note: In Reveal Codes -- if you chose to build hyperlinks (above) -- you will also see a special [Bookmark: Hyperlink] code next to each initial
    [Mrk Txt List} code of the code pair in the text areas of the document.)

    Tips

    ☼  Re-Generate! If you add or remove marked text (or the marking codes), or you add or remove other material from the document that might cause changes in pagination, be sure to generate the document again [see Step 4(d) above]. You can also use the Tools, Reference menu to generate the document. See also the caveats about the "Auto generate" option below. (See also "Sorting the List" below.)

    ☼  Multiple different (or same) Lists? 

    - You can create several differently named lists in the List field (see Step 2), choosing different ones for different groups of document items to Mark for inclusion in those Lists. (For example, see the last item below on using a macro to build a custom List from your selected text items in the document.)

    - You can also insert copies of the same-named list (using Step 4) in multiple locations in the document. (Be sure to re-generate the list in case pagination changes.)

    ☼  Delete the List? Just select it and press Delete. In Reveal Codes, delete the [Def Mark] and [Gen Txt] codes at that location, too, or the List will re-appear if you generate the document again (see tip above).

    ☼  Change the format? A List, like a Table of Contents or an Index, can be edited after it is generated — e.g., to format it further. Be aware that if you re-generate the List, any edits between the [Def Mark] and the ending [Gen Txt] codes will be lost, so such editing is best done on the final draft.

    Note

    Document text and format codes that are located outside the boundaries of the List's codes will not be affected by re-generation. For example, you could start two-column format just before a [Def Mark] code and then change it back to normal formatting by Discontinuing the columns after the ending [Gen Txt] code.

    Once the List is generated you should be careful not to create (i.e., start) a header, footer, or watermark inside it — i.e., between the pair of [Gen Txt] codes — or these items will be deleted when the List is re-generated.

    ☼  Sorting the List (with Tools, Sort)For a sort to work with Lists, which contain paragraph style format codes in the List entries, the best method is to temporarily convert the List to a 1-column table, sort the table, then remove the table structure (but not the now-sorted contents). This process is quick and easy to do. Here's how.

    [1] Select the enite List with mouse or keyboard.
    [2] Use Table, Convert, and in the Convert dialog that appears, set the Columns to 1 and the Text Delimiters to Paragraphs. Click OK. The selected List should now be inside a table where each row is a List entry.
    [3] Place the cursor inside the table and use Tools, Sort, "First cell in a table row". Click Sort. The List should now be sorted alphabetically inside the table.
    [4] Finally, remove the table structure with Table, Convert, Convert tables to text (the top, main radio button). Click OK.

    Related tips

    - For more on sorting see "How to use the Sort feature - some tips and examples" here.

    - Also, if you update the document with more List entries, you will need to first re-generate the document — and then sort the list again, as explained above.


    ☼ 
    Hyperlinks: When WordPerfect generates a List it creates Bookmark hyperlinks around the page numbers in the List. [This assumes you have enabled the "Build hyperlinks" option (screen shot) when generating the List (in Step 4(d) above).]

    Notes and tips

    - Hyperlinks become "active" when you enable Tools, Settings, Environment, Activate Hyperlinks. This setting is stored with the document when it is saved.
       
    For more on hyperlinks see this page. See also "Why some hyperlinks can fail to work while inside WordPerfect documents (.WPD, .WPT)".

    - You can also remove the blue underlines in hyperlinks (which might be desirable in printed copies of the document): see RemoveBU.html.

    ☼  Page number format for the List: When the Define List dialog is on screen [Step 4(b), or when double-clicking on the [Def Mark] code of a generated List] you can use the Edit button to change the Numbering format. For example, you might not want dot leaders preceding the page numbers, so you can choose "Text #" instead of "Text....#".

    Note: At the bottom of the Edit List dialog is an option to "List box captions automatically". The drop list lets you choose the type of box: [None], Figure, Table, Text, User, or Equation. This might be useful if you have not already marked captions in the chosen box type.

    ☼  "Auto generate" option. Note that the "Auto generate" option at the bottom of the Reference Tools dialog is enabled by default when you first install the program. [The link shows it disabled — the author's preference.]

    However, some users have found that if it is left enabled one or more irritations or problems can occur, such as:

    (1) a reminder message will pop up each time the document is saved or printed and has not been re-generated; and/or

    (2) the cursor can unexpectantly move to the bottom of the screen; and/or

    (3) selected text might not be printed (WP11 and later versions); and/or

    (4) printing can sometimes be slowed.

    The remedy is the same: Disable the option — but remember to re-generate the document whenever changes are made to it that might affect any reference tools you have used.

      Build a List viewable in the WordPerfect Document Map [as you edit the document]...Thanks to Tim Garner on WordPerfect Universe for posting a macro to do it
    (here). [Note: Tim is a trustworthy expert on WordPerfect Universe (under the member name: garneti.]

    Here's an excerpt from his post [with my annotations in square brackets]:

    "WordPerfect's Document Map ("DM") is a nice feature that was added in WP 11 [released in 2003]. It shows users a sidebar tree view based on certain WP styles, including headings, tables of contents [and Indexes] and tables of authorities. From that view, one can click on a particular item and be taken to that place in a document.

    One of the things that the DM displays is [...] a [L]ist [chosen after displaying the DM with View, Document Map and using the down arrow field choosing either "List" or  "All Markers" under the WP window label, "Reference Markers"].

    This is a small macro * that allows you to select some text in a document and add it to a list. [It automatically adds the required marking codes to the selection.] Then all the list items that you have added will be displayed in the Document Map under List (see the sample code here) [as well as in the generated List where it has been Defined and Generated, if these 2 steps have been made].

    -->> If this seems similar to bookmarks, it is. [In fact, hyperlink bookmarks are used in the document if the items are hyperlinked to their page locations.] But it has the advantage of being displayed on the sidebar, thus viewable any time the DM is displayed, unlike the Bookmark dialog."

    Additional information:

    You will need to manually create a List to store these selected text strings (see above), named (by default) "Navigator". () This name can be changed in the macro code.) You can create the List either [A] before selecting text items for the List or [B] after you make your selections when you play the macro. You will then position the cursor where you want the List to appear, then Define and Generate the new List, as you do with any List, and as explained in step 4 above. (The latter method (B) probably is easiest and less problematic since the name of the List will be automatically inserted during the creation of the List after using Tim's macro, and by re-generating the List it will be refreshed.)

    As previously explained, you can add items to an existing List after the List has been created. Just select those items, one at a time, and play the macro each time after a selection. It should show up immediately in the DM (if not, generate again). Alternatively, you can manually mark all the new items in one operation and then re-generate the List (See Step 3 and Step 4d above.)

    You can also delete items from an existing List (but not from the document) by simply removing the codes in the Reveal Codes window that surround the desired text item, then generating the List again to refresh it.

    - - - - -
    * For convenience, here's the raw macro code from Tim's post: (To copy this code into your WordPerfect program to create a working macro see https://wptoolbox.com/tips/CopyCode.html.)

    / Macro code begins [added here as a guide]

    // Change the name of the list to your preference.
    vListName := "Navigator"

    // --- Error handling: ensure text is selected ---
    If (?BlockActive = False)
    MessageBox (; "Uh oh!"; "No text is selected. Select your text, then run the macro again."; IconStop!)
    Quit
    EndIf

    // --- Capture selected text for list item name ---
    Text := ?SelectedText

    // --- Mark selected text for use in Document Map list ---
    MarkList()
    KeyPlusChar(18; "C") // Alt+C closes the Reference Tools / Mark dialog

    // --- If necessary, define list ---
    ListDefinitionCreate (vListName; ; DefLeader!)

    // --- Tie selection to list and update ---
    ListMark(vListName)
    MarkListUpdateList(vListName)

    Return // [<--added here to ensure macro exits]

    // ==========================================================
    // VK Key procedures by Ken Hobson (reliable replacement for SendKeys)
    // ==========================================================

    // Macro code begins [added here as a guide]

    Procedure KeyPlusChar(str1; str2) // e.g. Alt+C, Ctrl+O
    KeyDown(str1)
    Keys(str2)
    KeyUp(str1)
    EndProc

    Procedure Keys(str) // KeyDown/KeyUp for each character in str
    ForNext(i;1;StrLen(str))
    s = CtoN(SubStr(str;i;1))
    Key(s)
    EndFor
    EndProc

    Procedure KeyUp(str) // Release a key
    DllCall Prototype keybd_event ("user32.dll"; "keybd_event"; DWord!; {bVk; bScan; DWord(dwFlags); DWord(dwExtraInfo)})
    keybd_event(str; 9dh; 2; 0)
    EndProc

    Procedure KeyDown(str) // Press a key
    DllCall Prototype keybd_event ("user32.dll"; "keybd_event"; DWord!; {bVk; bScan; DWord(dwFlags); DWord(dwExtraInfo)})
    keybd_event(str; 9dh; 0; 0)
    EndProc

    Procedure Key(str) // Press and release a key (str must be integer VK code)
    KeyDown(str)
    KeyUp(str)
    EndProc

    // Macro code ends [added here as a guide]


    How to create custom styles to help automate creating Lists (and solve a few problems, too!)

    [...(STILL) UNDER CONSTRUCTION...]

    Meanwhile, see this post on WordPerfect Universe ... and this one in the same thread.

    Tip: The small .WPD document attached to that second
    WordPerfect Universe post — How to Use Styles to Create WordPerfect Lists — can also be downloaded from the Toolbox site here in an archive file, WPLists.zip. As a bonus, the styles referenced in that document are also included (stored) in that document, and thus they can be copied to any other document or template.