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

Page updated Jun 19, 2016

WordPerfect Tips
Main tips page | Browse tips
Using WordPerfect tables

Related table resources:

References and tutorials -

In WordPerfect X5 and later versions, the new Reference Center has a PDF User Guide with an extensive section on using Tables. To view it click on Help, Reference Center, WordPerfect section, User Guide.

Creating Formulas in a Table (Corel Tutorial)

Ten frequently asked questions about table formatting in WordPerfect (Corel Tutorial) 

Answers to 9 Frequently-Asked Table Math Questions (Corel Tutorial)

Some macros on this site that use or process tables -

Brackets - A macro that creates an "outdented" table -- i.e., a table that extends slightly outside page margins -- with a large, full-height left and/or right border that simulates a large square bracket ("[" and/or "]"); the result can also be "indented"

Calendars - Macros to create monthly or annual calendars using tables

Colsrchr - Macros that find text or symbols in just the current column of a table (and optionally color the rows)

DeleteRC - Deletes empty rows and/or columns in the current table

QwikFill - A macro that adds incrementing numbers (1..n) in the current table column from the current cell to the bottom of the column, in a manner similar to WordPerfect's QuickFill feature -- but easier and with more options

RowLines - Adds underlines and/or fills (shading) to every Nth row in a table for added readability or improved appearance

Some related tips -

Table gridlines, table borders, table guidelines - what they do and how they work. Why you might not see borders around cells on your screen, or see "reverse text" (white text on a dark cell background) in a table, etc.

Rotate table cell contents either 90, 180, or 270 degrees (or "skew" the contents at an angle).

WordPerfect tables offer more than the ability to organize information in columns and rows: They can do calculations, sort, format the position of several images and blocks of text, etc.

Below are some "How To" tips and links to other pages on this site (see also left sidebar for links to other information).

This is not a comprehensive list, but a "work in progress." Additional tips are welcome.

Be sure to search in WordPerfect's Help (F1) for "Working with tables".

Format ("line up") body text in a document or envelope with a table to keep items lined up horizontally and/or vertically

Numbering rows inside a table

Line numbering in page margins to include or exclude table rows with blank cells in the first table column

Wrapping document text around a table

Multi-page table not filling up pages (too much white space on some pages)

Force a table cell that could possibly evaluate to zero to display blank

Sorting WordPerfect tables

Sorting regular paragraphs in reverse order using a temprorary table

"Bracketing" text outside the left margin with a large "[" bracket

Locking and unlocking table cells

Using a borderless table to fill in a form

Splitting table cells in a row so the resulting cells are equal in width [linked page] 

Creating table cells with variable ("draggable") widths in any given row by using several stacked one-row tables [linked page]

Create a table that has a "Continued" label in the header row on the second and subsequent pages of the table

Add a page number in the header row (or other cell)

Making cells bold, italic, etc.

Rotate table cell contents either 90, 180, or 270 degrees (or "skew" the contents) [linked page]

Setting tabs inside table cells

Converting text into a table -and- converting a table to text or to a merge data file [linked page]

Convert labels to a table or tables to plain text [linked page]

Can't see table or cell borders? See here [linked page]

Adding a foreground or background color to table cells - Why you need to set a fill first 

Remove all background fills from a table (or multiple tables) with a macro

Finding the current table's name (three methods)

Duplicating a table cell's contents automatically 

Duplicating the entire current table

Renaming tables in a document (two methods)

Fill in forms using borderless tables [linked page]

Create vertical (rotated) labels or cards with tables [linked page]

Rotate cell contents to create "tear off" strips at the page bottom 

Convert a spreadsheet data into a WordPerfect table

Merge tips for tables [linked page]: 

- Converting existing mailing labels into a table
- Converting tables to merge data files or plain text
- Converting merge data files (.dat) to WordPerfect tables or "comma delimited" (a/k/a/ comma-separated-values, or .csv) files 
- Automatically number table rows (or items) when you merge into a table

Format body text in a document or envelope with a table to keep items lined up horizontally and/or vertically


•  Create a custom return address with a logo and text on your envelopes. See here for more.

•  A one-column, one-row table can put a border around a block of text (like a text box), and if you edit the table and choose Format, Row, "Divide row across pages," the material will "flow" across page boundaries if you add or delete material above the table.

Note: "Divide row across pages" is disabled by default.

Because of this, sometimes long tables cause excessive amounts of white space on a page when the program does not cause a cell's contents to flow continuously. Remedy: Enable the option.

•  You can easily set the dimensions or position (from the left edge) of such a table, add fills, remove borders, etc. You can use the Table menu or just right-click in a cell to get a context menu.

Numbering rows inside a table 

•  Method A: Use QuickFill

Type a "1" in the first (top left) cell, then a "2" in the next cell down, in column A. Select the entire column (tip: move the mouse cursor inside the column until it turns to an up arrow, then double-click your mouse), right-click the selected column, and choose QuickFill from the context menu that appears. All cells in that column will be populated with incrementing numbers.

•  Method B: Use a table formula

Postion the cursor in the first (top) cell of the column you want numbered, then click on Table>Formula Toolbar.

Click on Functions, then select All, and scroll down to Row(). Clck on Row(), then Insert. The formula will appear to the right of the blue arrow in the formula field. Click on the blue checkmark and the function will put the row number in the cell.

Alternative: Just type (without quotes) "+Row()" into the formula field, then click the blue checkmark.

Click on Copy Formula. Select Down, and enter the number of rows into which to copy the function. (Tip: To copy it to all rows in the column, click and hold the small up arrow to the right of the field; it will increment numbers until it reaches the maximum.)

•  Method C: Use a macro to populate all cells in the column

Here's a macro that can do the same thing as QuickFill, but can be played anytime -- especially after inserting or deleting rows, which can cause disruptions in numbering the rows.

Note that the table formula method will not suffer disruptions since +Row() always returns the current row number. Note also that the macro assumes you want to start numbering in cell A1; if not, delete the first PosTableBegin command.

// QuickFill.wcm
// Deletes any existing items in the first column, then
// adds incrementing numbers (1..n) in that column.

If(NOT ?InTable) Quit  Endif

Messagebox(vAns; "Caution";
"The first column's contents will be deleted
and replaced with incrementing numbers."; OKCancel!)
If(vAns=2) Quit Endif


// End of macro

A more robust version of the QuickFill macro (named QWIKFILL) can be found on this site here.

•  Method D: Use automatic paragraph outline numbers in the column's cells (see here)

Line numbering in page margins to include or exclude table rows with blank cells in the first table column
[From a thread on WordPerfect Universe here:]

Problem: Using Format, Line, Numbering in a document (to produce line numbers in the left page margin) can sometimes produce a problem with numbering table rows that have one or more blank cells in the first (left-hand) column of the table.

For example, if you disable "Count blank lines" in the Line Numbering dialog, then tables that contain data in the second or subsequent columns in a row but a blank cell in the first column will NOT be numbered. It's as if the program considers the entire row to be blank. A simple fix is to add a space character in the empty cells in the first column -- but there's a better way [thanks to a tip by Larry Lewis]:


(1) Place the cursor in the first cell of the table.
(2) Select the entire table with Edit, Select, Select Table.
(3) Use Format, Line, Numbering to turn line numbering "on" for all table rows by disabling (un-ticking) "Count blank lines". This adds a pair of separate [Ln Num] codes to just the "nested" table, over-riding the blank line option for the adjacent parts of the document. All the table's rows (even those with blank cells in the first column) should now be included in the line numbers in the page margin.


Similarly, you can selectively toggle the ability to count (or not count) blank lines in any portion of a document that uses line numbering.

For example, if you disable line numbering to "Count blank lines" for the document (e.g., at the top of the document), then select a smaller portion of it and enable that Line Numbering option for the selection, the smaller portion will count blank lines in that selection.

And vice versa: You can enable "Count blank lines" for the document, then disable counting them in a smaller selection of the document.

Either way, the smaller "nested" section(s) of text can be quickly selected for treatment by left-clicking in the left page margin and dragging down with the mouse. Or use Shift+arrow (or Shift+PgDown) to make the selection.

One small issue with selecting tables: Rather than use the mouse, it is best to select the entire table (Edit, Select, Select Table) separately to change blank line numbering for just that table. This produces just a single on/off [Ln Num] code pair.
Wrapping document text around a table

The table should already have been created in the current document. Then, using the following procedure you can insert the table into a graphic box. Then you can wrap text around the boxed table.

[1] In the Reveal Codes window, carefully select and copy (Ctrl+C) everything between (and including) the [Tbl Def] and [Tbl Off] codes to the Windows clipboard.

[2] Open a new, empty document and paste the table into it for temporary safe-keeping. Return to the original document and delete the original table (including the [Tbl Def] and [Tbl Off] codes). Reformat any document text, if needed.

[3] Create a graphics box on the page with Insert, Graphics, Custom Box, Table, OK. Double-click on the empty box to edit it (or right-click it, then choose Content, Edit). [Tip: If you are not currently editing a box, you can also double-click on the [Box] code in Reveal Codes at any time to bring up the Edit Box dialog with various options.]

[4] Paste the table (Ctrl+V) from the clipboard into the Editor window that appears (if it doesn't paste, you can go to the temporary document, select the table, and copy it to the clipboard again).

[5] Exit back to the document's body text area with File, Close or by clicking the Close icon on the property bar. (Note that the box can be resized later; the table will resize automatically inside the box, unless you have fixed the sizes of columns.)

[6] Select the box by right-clicking on it and choosing Select Box from the context menu. (Eight "drag handles" appear around the perimeter.) This will let you drag the box into a new position on the page. Or, you can use Position from the context menu to specify an exact location. (The box can be repositioned later, if needed.)

[7] While still selected, right-click the box and Choose Position, Attach...; this lets you "anchor" the box in a specific location. (For small tables you probably want to anchor it to a specific paragraph so it will move with that paragraph.)

[8] Right-click the box again. From the context menu you can wrap the text around the box in various ways, or re-size the box, reposition it, add a border, add a caption, etc. You should experiment with the various options to get the effect you want. [Tip: If you are not currently editing a box, you can also double-click on the [Box] code in Reveal Codes at any time to bring up the Edit Box dialog with various options.]

[9] Exit from the box by clicking elsewhere on the page.

Related tips:

If you resize columns to a specific width, set the table to "Center" position on the "page" (right-click the table, use Format on the context menu, then look under the Table tab). "Full" overrides the column widths, but lets you automatically expand/contract the table width by adjusting the graphic box's dimensions.

This is a good technique to use if you need to rotate a table 90 degrees, since you can rotate the contents of the box by right-clicking it and choosing Content, Rotate.... This can be useful when mixing landscape pages with portrait pages.

Multi-page table not filling up pages (too much white space on some pages)

When long multi-page tables seem to produce blocks of empty space on some pages between table rows when the table contents should fill up the page vertically, the cause might be the default setting for table rows which contain large amounts of material.

Possible solution:

•  Right-click in the table row that appears to be "pushed" down to the following page.

•  Choose Format from the context menu that appears.

•  In the Properties for Table Format dialog that appears, click the Cell tab and then enable (tick) the option "Divide row across pages". This should split the contents of cells in that row and cause the row to "join up" with the row above.

Force a table cell that could possibly evaluate to zero to display blank (i.e., not show a "0")

Assuming you are calculating figures in two columns (e.g., cell A1 times cell B1) and want the result to be shown in the third column (e.g., cell C1) only if it is not equal to zero.

Then, in Cell C1 (here, we assume the result of A*B should be multiplied by .50):

+IF((A1*B1)=0, "", (A1*B1)*.50)

(Note the use of two double quotes with no space between them.)

Sorting WordPerfect tables
It is a good idea to save the document before performing any sort on it. Make sure to enable "Allow Undo" in the Tools, Sort, Options button drop list.

The individual items in a sort are considered to be "records." WordPerfect lets you sort five kinds of records:

•  lines (each ends with one hard return),
•  paragraphs (each ends with multiple hard returns),
•  merge records,
•  parallel columns (table column or parallel column), and
•  the rows in a table.

Each row of a table is a record, and it is divided into its parts: Column (cell), Line (text in a cell), and Word (text in a cell). Cells are numbered from left to right, starting with cell 1.

To define a custom Table sort: Place your cursor in the table, click Tools, Sort, New. Give the sort a name (e.g., "My New Sort"), then with the Table Row radio button enabled, define the "Sort by" rule (or key), which defines the order in which the sort will be conducted. You can define additional rules with the Add Key button.

Normally, lowercase sorts before uppercase. To reverse this, click the Options button and choose "Uppercase sorts before lowercase."

To sort by the last word in a particular column's cells, define the column number to use and then use "-1" (without quotes) in the Word field, "-2" for the next to last word, etc.


¤  WordPerfect format codes ([Tab], [Hd Left Ind], etc.) are treated as field separators by the sort feature. Hence it might be a good idea to look over the table and see if all rows used in the sort have the same "format" (i.e., same number and location of Tabs, etc.) if you wish to use a particular field to sort on.

On the other hand, spaces, forward slashes (/) and hyphens separate words.

¤  Dates can be used as a Key Type (WordPerfect 10+), and each date in the table should be separated by slashes or hyphens; all characters are considered when sorting dates in numerical order. Hence, use the same format for all dates (e.g., 10 characters: 09/25/2013). Also: As noted, the slash or hyphen can be used to separate words, so parts of dates (e.g., the year) can be used as "words" to define a sort key for the dates you want to sort. See WordPerfect's Help <F1> or the Reference Center (on the Help menu) for more information.

Sorting regular paragraphs in reverse order using a temporary table
If you are keeping a diary, journal, or other document where you enter new lines (or paragraphs) at the end of the document, but now want to reverse the order of the items so that the most recent are at the top:

[1] Select all paragraphs in the document with your mouse or keyboard, or with Edit, Select, All.

[2] Click on Table, Create and set the Columns = 1 and Text Delimiters = Paragraphs. Click OK. You should now have a table with all document paragraphs in separate cells.

[3] With the cursor in the table, click Table, Insert, Columns = 1, Before, OK. You should now have a two-column table with the first column being empty.

[4] Enter a 1 in the top cell of the first column, and a 2 in the cell just below it in the same column.

Select just the entire first column (either "paint" all cells in that column, or place the cursor just under the top edge of the first cell in the column; when it changes to an up arrow you can double click there to select the entire column).

Click Table, QuickFill. This should sequentially number all cells in the first column.

Click inside the second column (or outside the table) to de-select the first column.

[5] Sort the table [see also "Sorting WordPerfect Tables" above for some tips and notes]:

With the cursor in the table, click Tools, Sort to bring up the Sort dialog.

Choose "First cell in a table row," then click New. Give the new sort routine a name (e.g., "Reverse table sort"). The "Sort by" radio buttons should be set to "Table row." Then, under "Keys," set the Type = Numeric and Sort Order = Descending.

Click OK.

With the new routine name ("Reverse table sort") selected in the Sort dialog, click Sort. The entire table should immediately sort into reverse order.

[6] Place the cursor in the first (numbered) column.

Click Table, Delete, Columns, 1, OK. You should now have a one-column table again.

[7] Final steps:

With the cursor in the table, click Table, Convert.

Select the "Convert tables to text" button, and the "Separate text with paragraphs (hard returns)."

Click OK.

"Bracketing" text outside the left margin with a large "[" bracket
Here's the effect. Note that the text lines up with the left margin, and the bracket is "outdented."

Here's how to do it
and create a QuickWord from it to make it easy to re-create anytime:

[1] Open a new blank document. Create a 1-row, 2-column table with Table, Create.

[2] Drag the middle vertical cell border to the left as far as it will go. This leaves a minimum-width left-hand column (you can resize this column to a specific dimension by right-clicking in the column, then choosing Format, Column). Typically, this is 0.67" wide. The right-hand column (the cell) will extend to the right margin.

[3] Right-click in the right-hand column and choose Borders/Fill, and then click the Cell tab. Remove ("X") all 4 borders from that cell. This should leave the first cell (i.e., the left-hand column) with a 3-sided border shaped like a left bracket ("[").

[4] Right-click in the right-hand column and set the top/bottom row margins with Format, Row (e.g., to 0.40" for each). Be sure to enable (check) "Divide row across pages" and click on the "Multiple lines" option. Set the inside left/right column margins to 0.0" with Format, Column; while there, align the contents in cells, if desired.

[5] Exit from the table. Place the cursor just before (i.e., just to the left of) the [Tbl On] code. Change the left margin to 0.933" with Format, Margins. (This assumes your default left margin is 1.0". If not, set the margin appropriately so that the left margin dimension plus the width of the table's left column equal your normal left margin setting.)

[6] Place the cursor just after the [Tbl Off] code and change the left margin back to 1.0" (or your preferred left margin setting).

The table should now be outdented beyond the left margin by the width of the first column.

To automate creating the table in future sessions -- turn it into a QuickWord:
  • Before adding any text to the table do this:
  • In Reveal Codes, place the insertion cursor before (just to the left of) the [Tbl Def] code.
  • In Reveal Codes, select the six adjacent codes (first remove any stray hard returns between them). These are the codes to select:
    [Lft Mar][Tbl Def][Row][Cell][Tbl Off][Lft Mar]
  • With the codes selected, create a QuickWord with Tools, QuickWords. Perhaps give it the name of "\[" (without quote marks).
  • Back in your document, type (without quotes) "\[".
  • Result: A new table with the "[" border outdented by the same amount as the first (empty) cell in the table.
[7] Enter text in the second column of the table. The bracket will extend downward as you do this -- including onto the following page if necessary.

Locking and unlocking table cells (the Tab key will let you skip over locked cells)

To lock one or more cells:

Place your cursor in the cell (or select the range of cells) to be locked with your mouse, then right-click on the cell(s) and choose Format from the context menu that appears. This brings up the Properties for Table Format dialog. Under the Cell tab, enable (i.e., tick) the check box "Lock cell to prevent changes," then click Apply or OK.

Repeat this procedure to lock all cells that should be locked. (Remember, you can skip over locked cells with the Tab key.)

Note that locked cells will display a circle with a slash through it (the universal "no entry" symbol) when the cursor is over the locked cell. However, this should not prevent using active hyperlinks in that cell, even though the cursor is not the usual "pointing finger." Just be sure to place the cursor directly on the hyperlink.

To unlock one or more cells (even in a completely locked table):

Step 1. Select the cell(s).

For individual cells: Place your cursor over the cell to be unlocked with your mouse, inside the top (or left) edge of the cell until the cursor changes to an arrow, then left-click once to select the cell.

For multiple cells:
Place your cursor over the first cell to be unlocked with your mouse, inside the top (or left) edge of the cell until the cursor changes to an arrow, then hold down the left mouse button and drag the mouse to select the remaining cells. (To unlock a completely locked table you should select all cells.) Release the left mouse button.

The cell(s) should now be completely filled in black (i.e., reverse color), right up to the cell borders.

Step 2. Right-click on the selected item(s) and choose Format from the context menu that appears. This brings up the Properties for Table Format dialog.

Step 3. Unlock the cell(s).

To permanently unlock one or more cells:

Under the Cell tab in the Properties dialog, disable (i.e., un-tick) the check box, "Lock cell to prevent changes," then click OK.

Note that if you are permanently unlocking a cell at a time, repeat Steps 1-3 for all cells that should be unlocked. If you are permanently unlocking a range of selected cells, all cells in that range will be unlocked; go to Step 4.

To temporarily unlock all cells:

Under the Table tab in the Properties dialog, enable (i.e., tick) the check box, "Disable locks in cells," then click OK.

Note that this option is a toggle switch that lets you unlock and re-lock previously locked cells. You can re-lock all locked cells when you have finished editing the table by disabling (i.e., un-ticking) the check box. It is independent of the Cell tab option above, and therefore it does not permanently unlock any locked cells.

Step 4. Test the results of Steps 1-3. [Thanks to Larry Lewis for parts of this method.]

Making cells bold, italic, etc.

Two methods:

Method A. You can select the text in a cell and apply bold, italic, etc., the same as you would do in normal body text: When the text is selected, use the [B], [I], etc. buttons on the property bar or use Ctrl+B, Ctrl+I, etc. In Reveal Codes you should see the attributes codes for these text attributes. Be sure to read the next paragraph.

Method B. You can also select the cell itself (tip: move the mouse cursor inside the cell next to its border until it turns to an up arrow or left arrow, then left-click your mouse; the cell turns completely black when selected, up to the cell borders). Then use the same buttons or shortcuts as in the previous paragraph to apply the attribute. However, notice that only new [Font] codes will show up. Attribute codes are hidden (for some unknown reason). This often causes confusion when users try to remove such attributes with the normal buttons or shortcuts. Instead, select the cell(s) and apply the same attribute to toggle the attribute off.

Setting tabs inside table cells (and navigating to those tabs)
[1] Place your cursor just above the table.

Tip: If you open the Reveal Codes window, you can place the cursor just to the left of the [Tbl Def] code.

[2] Clear all current tabs at that point in the document (you can restore them following the table, in step 4):

Click on Format, Line, Tab Set. This brings up the Tab Set dialog.

but recommended: Enable the radio button, "Tab position from left edge of paper (absolute)".

Click Clear All, then Close.

[3] Edit the table to set new tab positions in cells.

Once they are set you can navigate to the tabs stops in any celll that has the new tab stops with Ctrl+Tab or Ctrl+Shift+Tab. (Just pressing Tab inside a table takes you to the next cell.)

Always start from the top of the table and proceed setting tab stops rightward and then downward in various cells. Otherwise, the program might become confused (e.g., if you go back up to an earlier row to reset some tabs). In other words, setting tabs inside tables might be best left to your final draft of the document.

[4] Immediately following the table, set tabs for the rest of your document text. (Here is a macro to do this for you.)

[Thanks to 'Robin' and 'bobhs' at WordPerfect Universe for the basic steps.]

Using a borderless table to fill in a form

See this page.

Create a WordPerfect table that has a "Continued" label in the header row on the second and subsequent pages of the table
[1] Copy the original repeating header row(s) on the first page of the table to the Windows clipboard.

[2] For the original header row, de-select “Header Row repeats on each page”.

[3] Paste (from the clipboard) the original header row to the top row of the second page of the table. Type “Continued” where appropriate. This row will now be the header for the second and subsequent pages (“Header Row repeats” should still be selected in this row). [Thanks to Maggie Holman at WordPerfect Universe for this tip.]

Add a page number in the header row (or any other row's cell)
    If the header row is set to repeat on all pages (the option "Header row" in Table, Format, Row is enabled), then place the cursor in the row and use Format, Page, Insert Page Number. (The DOS keyboard has a shortcut: Ctrl+p.) The page number will be visible in the header row on subsequent pages.

    Similarly, place the cursor in any cell of the table and use Format, Page, Insert Page Number.

    Adding a foreground or background color to table cells - Why you need to set a "fill" first

    From Pascal Couture on OfficeCommunity (Jul 18, 2012):

    "In WordPerfect, you create a table, select some of the cells and you select a color from the 'Table Cell Foreground Fill Color' icon on the Property Bar.  Nothing happens... the cell color doesn't change.

    The reason why the cell color isn't affected in this case is that the 'foreground color' is only applied to cells that have a 'cell fill' selected.  I agree this is a little counter-intuitive.  Essentially, once a cell fill is selected, you can then select both a foreground and background color to apply to that gradient/pattern fill.

    You can set a cell fill by using the 'Cell Fill' icon on the Property Bar (to the left of the foreground color icon), or from the 'Properties for Table Borders/Fill' dialog (accessible from the 'Borders/Fill' item in the 'Table' menu)."

    About foreground and background colors in table cells (and also text boxes and graphic boxes):

    These features can be a little confusing, so I did a little experimenting and posted the results on WordPerfect Universe. See Footnote 1 below for a duplicate of that post.

    Remove all background fills from a table (or multiple tables) with a macro

    Here are some relatively simple macros to remove background fills from all cells in the current table or from all tables in the document. Obviously, make document backups first.

    This would also let you print the document without table fills, then restore the fills with Edit, Undo (or Ctrl+Z).


    To copy the code below into your WordPerfect program to create a working macro, see here.

    To assign the macros to toolbar buttons, keyboard shortcuts, or a menu, see here.

    Current table only:

    // Macro code begins
    If(Not ?InTable)
    Messagebox(;"Turn Table Fills OFF";
      "Error! Place the cursor in a table with cells with color fills FIRST!")

    TableSelectOn (SelectionMode: Table!)
    SelectTable ()
    TableCellFillStyle (FillPattern: NoFill!)
    SelectOff ()

    Messagebox(;"Turn Table Fills OFF";
      "Done! You can Undo the effects of this macro with Ctrl+Z")
    Return  // (exit from the macro)
    // Macro code ends

    All tables:

    IMPORTANT:  When you copy this macro code into WordPerfect you will first need to remove the text character string ("[Tbl Def]") between the double quotes in the SearchString() command (they are just a placeholder) and replace it with the single code of the same name using the Codes button on the macro toolbar. (
    Be sure to retain the quote marks.) Otherwise the macro will fail to find the initial table definition codes for each table, and thus fail to find the tables. [Tip: After playing the macro inspect the result to ensure the macro has processed all tables.]

    // Macro begins:
    OnNotFound(End@)  // (when no more tables are found, exit macro)
    PosDocVeryTop  // (start at the very top)

    While(True)  // (i.e., keep looping until no more tables are found)
      SearchString("[Tbl Def]") // (<- insert [Tbl Def] code with Codes button)
      // When a table is found:
      TableSelectOn (SelectionMode: Table!)
      SelectTable ()
      TableCellFillStyle (FillPattern: NoFill!)
      SelectOff ()
    Endwhile  // (loop ends here)

    Label(End@)  // (exit macro here:)
    MatchSelection  // (restore default setting)
    Messagebox(;"Turn Table Fills OFF";
      "Done! "+vCount+ " tables were processed." +NToC(0F90Ah)+
      "You can Undo the effects of this macro with Ctrl+Z")
    // Macro ends

    Finding the current table's name (three methods)


    ¤  A table's internal name can be useful with table calculations or with macros that need to find specific cells.

    ¤  To learn about renaming a table to something other than the default name (TABLE A ... etc.), see WordPerfect's Help (F1) and search for "Naming tables". Then see the sections below ("Duplicating the current table" and "Renaming tables in a document").

    Method A.

    •  Place the cursor in a table;
    •  click Table, Formula Toolbar (an On/Off toggle option);
    •  the table's name will appear in a field on that toolbar.

    Method B.

    •  Place the cursor in a table;
    •  click Edit, Go To; then choose Table in the "Go To" dialog;
    •  view the current table's name in the "Select Table" field. [Note: You can use the down arrow list in that field to quickly navigate to any other table. This will not work if they have the same name as the current table; see the section below on renaming tables.]

    Method C.

    •  Use a simple macro when the cursor is in a table to display the table's name (which can also display the cells name and cell address). Here is an example:

        Messagebox(;"Current Table and Cell Information";
            "Table name: "+ x +NToC(0F90Ah)+
            "Cell name: "+ y +NToC(0F90Ah)+
            "Cell address: "+ x +"."+ y)
            "You must have the cursor inside a table.")

    To copy this code into your WordPerfect program to create a working macro, see here.

    Duplicating a table cell's contents automatically

    WordPerfect tables provide many of the functions of a full spreadsheet program (Quattro Pro, Excel, etc.). Hence, you can set up a simple formula in a target cell (the cell which should contain the duplicated material) to automatically reference the source cell.

    Tip: For more on WordPerfect's tables and using formulas and functions in them, see the program's Help (F1) module and/or the Reference Center.


    Assume you want the material in Table A, cell A1 to be automatically duplicated (mirrored) in Table B, cell A1. (See also "Finding the current table's name" above.)

    Step 1. Format the cell(s).  For example:

    •  For text strings (e.g., "The XYZ Company," "April 13," etc.), right click in the source cell, choose Numeric Format, then choose Text. [Note that even dates like "April 13, 2015" are considered text unless you format the cell as in the next paragraph.]

    •  For formatted dates (e.g., where you enter the date as "4/13/15" or "4/15" to produce the standard U.S. date "April 13, 2015"), you will need to choose Date/Time as the Numeric Format in both source and target cells.

    Step 2. Add the "duplicating" formula to the target cell.

    •  With the cursor inside the target cell, the Table property bar should appear (if not, see here).

    •  Click the "f" button on that property bar to display the Formula toolbar above the editing screen.

    •  (Using our current example:)  In the formula field just to the right of the blue check mark () delete any text string there and then type the formula (without quotes), "+TABLE A.A1" -- assuming this is the source cell. (Note the plus sign and the space.)

    •  Then click the blue check mark button to add the formula to that cell. (If you see a warning message, "Reference to a duplicate name..." then you probably have another table of the same name in the document. See "Renaming tables in a document" below for how to rename them.)

    Duplicating the entire current table



    Selecting a table with Edit, Select, All -- and/or selecting it to includie the [Tbl On] and [Tbl Off] codes (visible in Reveal Codes) -- then copying it (Ctrl+C) and pasting it (Ctrl+V) into other locations will produce identical table structures, formatting and content -- but each will have the SAME table name.

    As noted in the previous section, in documents containing multiple tables a table's unique name can be useful -- even critical -- with  calculations or macros that need to find specific (named) cells.

    If you need to perform such operations within or between multiple tables they very probably will need to have different names. Therefore, place the cursor inside the source table and choose Edit, Select, Select Table (not Edit, Select, All) before copying and pasting.

    Table names:

    If you want to know the current name of a particular table, see the tips under "Finding the current table's name" above.

    See the "Renaming tables in a document" section below for methods to rename existing tables -- especially if you want each one to have a different name or a non-standard name.


    Use this method if you need the duplicate tables to be named differently with standard (default) table names (e.g., Table A, Table B, etc.).

    •  Place the cursor in the source table;
    •  click Edit, Select, Select Table (not Edit, Select, All);
    •  right-click in the selected area of the table and choose Copy (or just press Ctrl+C);
    •  the "Cut or Copy Table" dialog appears;
    •  choose "Selection" then click OK to return to the document;
    •  relocate the cursor to the desired target location and click Ctrl+V;
    •  repeat the previous step for multiple copies.

    Renaming tables in a document (two methods)


    ¤  If you want to know the current name of a particular table, see the "Finding the current table's name" tips above.

    ¤  Table names can be entered in lower case or mixed case, but the program will convert them to all UPPER case letters.

    ¤  Names must begin with a letter but can contain letters, numbers, and spaces.

    ¤  Names appear to be limited to 20 characters (at least with WordPerfect X7).

    Method A. This simple method can be a bit tedious (and sometimes confusing) in a document with lots of tables. It might be better to create and use a macro such as the ones below.

    •  Click Table, Names to bring up the "Table Names in Current Document" dialog.

    •  Choose a table/floating cell and click the Edit button to change the name.

    Method B: Use a macro.

    •  Create and save either or both macros in the next section.

    Tip: To copy macro code into your WordPerfect program to create a working macro, see here.

    •  Place the cursor in the desired table and play the desired macro.

    Example 1. A macro to rename the current table only (displays information about the new name and cell location). Note that it works in regular tables but not in (one cell) Floating tables; for Floating tables use Method A.

    // Macro code begins here
    // Change the name of the current table.
    // [Note: Not for renaming Floating cells.]
    vHRt = NTOC(0F90Ah) // (used in dialogs for hard returns)
    If(NOT ?TableInTable)
        "You must have the cursor inside a table to"+vHRt+
        "change the table's name with this macro.")
    vNewName:=vCurrentName // (used as default in GetString)
        "Current table name is: "+vCurrentName+vHRt+
        "Enter the table's new name (max=20 characters): ";
        "Rename current table";20)
        "You must enter some text in the field"+vHRt+
        "or click Cancel in that dialog to exit.")
    // Trim any leading or trailing spaces:
    // Change the name:
    Messagebox(;"Table's new name and current cell information";
    "Current table name: "+ x +vHRt+
    "Cell name: "+y+" ( i.e., Column x Row )"+vHRt+
    "Cell address: "+x+"."+y)
    // Exit macro here:
    // End of macro code

    Example 2. A macro to rename all tables in the document with a chosen text string followed by a number (e.g., MY TABLE 1, MY TABLE 2, etc.). The macro also renames all Floating (cell) tables. [Thanks to Kenneth Hobson on WordPefect Universe, who posted the code here.]:

    // Macro code begins here
    GetData(vTableCount; Table!; Count!; CurrentDoc!)
        Declare (vNamesArray[vTableCount];vSortedNamesArray[vTableCount])
        ForNext(vNextTable; 1; vTableCount)
            GetData(vTableName; Table!; Name!; CurrentDoc!; vNextTable)
    MessageBox(vMB;"Bailing Option";"Do you really want to rename all of your tables and floating cells?  If so, press Yes now.  Press Ctrl+G and tables to see the name of your tables.";YesNo!|IconStop!)
    If (vMB<>6)
    GetString(vNewName;"Please enter a prefix name for each table.  Floating cell names will be ordered and precede all table names.  "+HR+HR+"e.g. MyTables, becomes Mytable1, Mytable2, Mytable3 etc.  Mytable3 could be the start of your new table names where the first two were floating cells.";"Prefix Table and Floating Cell Names")

    // End of macro code


    If you want the numeric parts of each table's new name to be the same length (e.g., MYTABLE01, MYTABLE02 ... MYTABLE99) then you can pad the shorter numbers with a leading zero. Change the TableNameChange() command in Kenneth's macro (Example 2 above) to:


    Rotate cell contents to create "tear off" strips at the bottom of a page

    General method:

    Create a large 2-row table, with the bottom row divided into several cells. The easy way is to create (e.g.) a 2-row by 10-column table, then join the cells in the top row to create the description section (e.g., "For Sale" sign, etc.) and rotate the cell contents in the bottom row.  Here's how:


    Set the table space to a maximum size by reducing all page margins to Minimum. Set the page Zoom level (View, Zoom) so you can see the entire table.

    Create the table:

    Click Table, Create. Choose (e.g.) 10 Columns and 2 Rows. Click Create.

    Place the cursor in the bottom row and set the row height with Table, Format, Row (tab). The Properties for Table Format dialog should display. Set the row height to (e.g.) 2.0" (Fixed). [Optional: Adjust the row's Top/Bottom margins.]

    Click the OK button to return to the table.

    Enter the text for the cells in the bottom row:

    Don't worry that the text is not yet rotated; just type it (or paste it) in the first cell. You can also use <Enter> to add a second line of text. (Open Reveal Codes so you can see if any text is marked Hidden; if so, try using a smaller font size.)

    Duplicate the cell's text in the remaining cells -- e.g., with standard copy and paste.

    Rotate the text in the cells:

    When finished entering text in the bottom row's cells -- all cells must contain something to rotate them -- select all cells in the row. (The easiest way is with the Select Table Row button on the Table property bar.)

    Then use Table, Format, Cell (tab). Under "Align Cell Contents" set Horizontal and Vertical to Center, and Rotate to 90 or 270 degrees. A small graphic on the dialog should show a sample of the result of these settings. [Optional: Adjust the cell's Left/Right inside margins.]

    Click the OK button to return to the table.

    Note: The row's text is now inside text boxes inside each cell. To edit the text, click inside the box(es), which opens a full-screen Text Box Editor.

    Format the table's top row:

    Select all cells in the top row and join them with Table, Join, Cell.

    Alternative: Place the cursor in the first cell in the row and click Table, Join, QuickJoin; then drag the mouse across the remaining cells in that row to join them. Note that QuickJoin is "sticky" for the session unless or until the option is unchecked.

    Enter the text for the top row (generally this is the main part of your sign):

    As you do the cell should expand downward (if Table, Format, Row has "Multiple lines" enabled).

    Add spaces to push the bottom "tear off" row down to the bottom edge of the page.

    You can also use Table, Format, Cell to set the top row's cell alignment.


    •  Remove or add colored borders, fills, etc.

    •  Use dotted lines for the cells in the bottom row. (If the row is not selected, be sure to select it first.) Click Table, Border/Fill. On the Cell tab, enable "Each cell in selection." For "Cell lines" set the Left/Right/Top buttons to dotted (or dashed) and the Bottom to "X" (none). Click OK when done.

    •  Use scissors to cut the printout's vertical borders between the cells in the bottom row to make them easier to tear off.

    Convert spreadsheet data into a WordPerfect table

    Here are a couple of ways to do this. Both methods convert a spreadsheet's displayed values (i.e., not formulas) into a WordPerfect table. The author has tested them using QuattroPro but they should also work using the Microsoft Excel program or similar.

    Method A.

    This method might be useful to quickly insert the material as a simple table -- i.e., without any formatting or formulas -- into a WordPerfect document.

    [1] Open the spreadsheet program and select the range of cells you want to copy. For example, you can click in the upper left cell of the range, then hold down the Shift key while you click in the lower right cell of the range.

    [2]  Copy the selection to the clipboard with Ctrl+C (or right-click on the selected cells, then choose Copy).

    [3]  In WordPerfect: Place the cursor where you wish. Right-click there and choose Paste Unformatted Text from the context menu that appears. (Or you can paste from the WordPerfect menu using Edit, Paste Special, Unformatted text.)

    This inserts the selected spreadsheet
    cells as plain text. The original rows are inserted as paragraphs (i.e., ending with a [HRt] code) and the original cell contents are separated by tabs.

    [4]  Select the newly inserted material, and then click Table, Create. A dialog appears entitled "Convert: Text to Table". The "Table Delimiters" should be set to Tabs.

    Click OK. You should now have the data formatted as a table.

    Method B.

    This method lets you directly import the spreadsheet data as either a Table, or as Text (same as Method A but with some formatting), or as a Merge Data File.

    However, it does require you to specify a range of cells by their cell addresses if you wish to import just a specific section of the spreadsheet.

    [1] In WordPerfect: Place the cursor where you wish. EITHER click Insert, File and browse to the spreadsheet file location, choose it, then click Insert; -OR- use Insert Spreadsheet/Database, Import.

    [2] The Import Data dialog appears. Choose "Import as: Text". If the Filename field is empty browse to the spreadsheet file and choose it. Then click in the Range field to specify the range of cells to import (e.g., A:A1..A:D100). Click OK to return to the document.

    [3] Select the newly inserted material in the document and click Table, Create. A dialog appears, titled "Convert: Text to Table". The "Table Delimiters" should be set to Tabs.

    Click OK.
    You should now have the data formatted as a table.


    ☼  To modify the resulting table's Properties you can double-click on the [Tbl Def] code in Reveal Codes, or you can use Table, Format from the WordPerfect menu. If the cursor is inside the table you can also use the Table Property Bar's options.

    ☼  Once converted to a WordPerfect table you can quickly create a Merge Data File from it by simply deleting the [Tbl Def] code, and in the pop up (Delete Table) dialog that appears, choosing "Convert table contents". [See also Merge tips for tables [linked page] for more on creating and using Merge Data Files, etc.]

    Footnote 1

    [Continued from above]

    Foreground and background colors in tables, text boxes, and graphic boxes

    [From a 2013 post on WordPerfect Universe:]

    ... After a little experimenting with table cells, text boxes, and graphic boxes and setting the Foreground to pure red (RGB=255,0,0) and the Background to pure blue (RGB=0,0,255):

    The Foreground color is used for -

    - 5%-100% Fill settings (i.e., a solid color of various shades); and

    - dots (individual pixels) or lines in a Pattern Fill.

    The Background color is used for the other parts of the cell.

    Hence, it might help to think of these things the way some graphics programs use the word "layer":

    Foreground = analogous to a top layer (used for solids, dots, and lines).
    Background = analogous to a bottom layer.

    The interaction between Foreground and Background color is most easily seen when choosing a Pattern Fill....

    For example, try using the Bricks pattern and change just the Foreground color to red (leave the background set to the WP default, or to white). Note that the "mortar" lines are now red, and the bricks are white.

    Then reverse the process and change just the Background color to red (foreground to white); this makes the mortar lines white, and the bricks are red.


    For some graphics -- such as 2 dimension shapes inserted with Insert, Shapes (and edited with right-click, Properties) -- the Fill Color corresponds to the Background color above, and the Pattern Color corresponds to the Foreground color (for the dots, lines, or geometric shapes inside the shape).