| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
| Page updated May 22, 2018
Main tips page | Browse tips
Using WordPerfect tables
Related table resources -
► Some references and tutorials on using tables
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. [You can also search in WordPerfect's Help (F1) for "Working with tables".]
Creating Formulas in a Table (Corel Tutorial)
Creating Forms with Tables (Corel Tutorial)
frequently asked questions about table formatting in WordPerfect
to 9 Frequently-Asked Table Math Questions (Corel Tutorial)
Search the Corel support site's Knowledge Base for "Table" ... but be aware that some search results apply to the Table of Authorities or Table of Contents features, which are not the same thing as the Table feature
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)
CustomTbl - Creates a custom table at the cursor position with your preferred default settings for the number of columns and rows, as well as the table's horizontal position, cell margins, cell widths, and cell format (numbers, currency, text, etc.)
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
Below are some "How To" tips and links to other pages on this site (see also the ◄ sidebar for related information).
This is not a comprehensive list, but a "work in progress." Additional tips are welcome.
* * *
Shortcut keys for WordPerfect tables|
WordPerfect TABLE menu (and some other) default shortcut keys when using a WordPerfect for Windows (WPWin) keyboard or a DOS (WPDOS 6.1) keyboard.
Note: Some Table menu shortcut keys will not be available unless a table is first created.
• For this and many other WordPerfect shortcut keys you can download a PDF file: WP_shortcut_keys.pdf - A list of major (and some minor) WordPerfect for Windows shortcut keys for the Windows and DOS keyboard definitions (keystroke assignments) you can use to navigate a document, format items, select text, etc.
• In recent program versions you can print a list of your current shortcut key assignments with Tools, Settings, Customize, Keyboards (tab), <select your keyboard>, Edit, Print Report.
• To assign a keyboard shortcut to an available key or key combination see here.
• See also "Setting tabs inside table cells..." below.
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
Tips: These methods can be used might best be used in an empty column of the table -- most often Column A. If you need to add a new empty Column A to an existing table: With the cursor in the table, click Table, Insert, Columns = 1, Before, OK. You should now have a table with an empty first column. [See also Sorting regular paragraphs in reverse order using a temporary table here.]
• 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
Example 1: 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.
// Deletes any existing items in the first column, then
// adds incrementing numbers (1..n) in that column.
If(NOT ?InTable) Quit Endif
"The first column's contents will be deleted
and replaced with incrementing numbers."; OKCancel!)
If(vAns=2) Quit Endif
// End of macro
Example 2: 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.
Note: 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.
 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.
 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.
 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.]
 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).
 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.)
 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.)
 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.)
 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.]
 Exit from the box by clicking elsewhere on the page.
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.
• 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 as blank (i.e., not show a "0")
▸ Assuming you are calculating figures in two columns (e.g., cell A1 multiplied by 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.
▸ Here, all cells formatted in Table, Numeric Format as General.
▸ Then, in Cell C1 (here, the result of A*B should be multiplied by .50):
+IF((A1*B1)=0, "", (A1*B1)*.50)
▸ Assuming there is text in one table cell (Table A, cell A1) and you want it to display (duplicated) in another table cell (even in a different table) such as Table B, cell C1 -- but if there is nothing in table A's cell you want Table B's cell to be completely empty -- i.e., without ?? or ERR symbols.
▸ Here, the text cell is formatted in Table, Numeric Format as Text, while the calculation cell is formatted as General. (ISNA = IS Not Available = Empty)
▸ Then, in cell TABLE B.C1 (the second table) you could enter this formula:
+IF(ISNA(TABLE A.A1),"",TABLE A.A1)
Note the use of two double quotes with no space between them.
Of course, instead of the "" (empty or null) specification as in the previous example you could use something to alert you, such as "REFERENT CELL EMPTY!" or similar text. For example, in a table cell that determines the existence of an entry in TABLE A.A1 you could insert this:
+IF(ISNA(TABLE A.A1),"EMPTY",TABLE A.A1)
+IF(ISNA(TABLE A.A1),"EMPTY","NOT EMPTY")
The general logic of an IF statement: a True condition returns a 1, while False returns a 0. (Hence in actual use the first condition will be either 1 or zero.)
+IF (<if condition is TRUE>,<...do THIS>,<...otherwise do THAT>)
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.
▸ More tips on sorting tables: See the Sorting page here.
¤ 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 (for example) the most recent are at the top, here's a good way to do it: Use a temporary table for the sort process.
Note that using a table also helps prevent changes to existing formatting in the paragraphs (such as existing automatic numbering scheme applied to the paragraphs). The table cells act like little protective containers for each of your paragraphs during the sort.
☼ If the paragraphs are separated by more than one hard return code (i.e., displayed as [HRt] in Reveal Codes) and you want to remove the extra ones first ... this can be done with Edit, Find and Replace to replace the multiple adjacent codes with a single code. (For more on this see the Find and Replace tips here.)
☼ Or you could use a macro such as DelExtraHR.wcm here. (Be aware that macro processes the entire body text area of the document. If the relevant material is embedded with other material that should not be processed, it might be helpful if you cut or copy the desired text into a new temporary document and remove the extra hard returns there; then copy the material back into the original document when you are done.)
☼ Removing extra hard returns is not required for the procedure below, and in fact might not always be desirable. You might actually want the extra space (which to the program in this case is an extra -- if empty -- paragraph). Work on a copy of your document and try it both ways, with the extra returns and without them.
(Recommendation: If you are new to sorting WordPerfect tables see the tips and notes in the short section above before proceeding.)
 Select all paragraphs in the document with your mouse or keyboard, or with Edit, Select, All (or Ctrl+A on the Windows keyboard). Or just select the relevant paragraphs.
 Click on Table, Create and set the Columns=1 and the Text Delimiters=Paragraphs. Click OK. You should now have a table with all selected paragraphs in separate cells.
 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. (At this point don't worry about column widths since you will be removing this column later.)
 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). [Note that the column must be selected first, before using WordPerfect's QuickFill (next paragraph). An alternative is to use the macro, QwikFill, which can insert sequential numbers (and more) in a column that is not selected.]
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.
Tip: An alternative to these steps is to use a macro to automatically insert all the numbers in the column, such as the QwikFill.wcm macro here.
 Sort the table.
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.
With the new routine name ("Reverse table sort") selected in the Sort dialog, click Sort. The entire table should immediately sort into reverse order.
 Place the cursor in the first (numbered) column.
Click Table, Delete, Columns, 1, OK. You should now have a one-column table again. (The width of the column can be ignored here.)
 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)."
"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:
 Open a new blank document. Create a 1-row, 2-column table with Table, Create.
 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.
 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 ("[").
 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.
 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.)
 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:
 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.
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.
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)
 Place your cursor just above the table. If you open the Reveal Codes window you can simply place the cursor to the left of the [Tbl Def] code.
 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.
Optional but recommended: Enable the radio button, "Tab position from left edge of paper (absolute)".
Click Clear All, then Close.
 Edit the table to set your text at any of the new tab positions in cells.
Once the new tabs are set you can move the cursor to a desired tab stop in any celll that has the new tab settings with Ctrl+Tab or Ctrl+Shift+Tab. (Just pressing Tab inside a table takes you to the next cell.)
This simply inserts either a [LeftTab] or a [HdBackTab] format code in the cell. (As with most other format codes you can always delete them in Reveal Codes.)
Tip: Always start from the top of the table and proceed setting your text at desired 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 later to reset some tabs). In other words, setting text to new tabs inside table cells might be best left to your final draft of the document.
 [Optional but suggested:] Immediately following the table (i.e., after the [TblOff] code) set your preferred tabs for the rest of the 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.
Creating a WordPerfect table that has a "Continued" label in the header row on the second and subsequent pages of the table
 Copy the original repeating header row(s) on the first page of the table to the Windows clipboard.
 For the original header row, de-select “Header Row repeats on each page”.
 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.]
How to 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
Messagebox(;"Turn Table Fills OFF";
"Error! Place the cursor in a table with cells with color fills FIRST!")
TableSelectOn (SelectionMode: Table!)
TableCellFillStyle (FillPattern: NoFill!)
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
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!)
TableCellFillStyle (FillPattern: NoFill!)
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 and/or cell address (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 entire current table" and "Renaming tables in a document").
¤ Note especially that copying and pasting tables in a document can produce tables with duplicate names. This can be problematic if you need to locate particular cells in different tables (e.g., with a macro). See the important notes in Duplicating the entire current table for some solutions and tips.
Method A. Use the Formula Toolbar.
• 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. Use "Go To".
• 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 macro. Here are two examples.
• Example 1. Play it inside the current table.
This simple macro will display the table's name (it will also display the current cell's name and cell address). Click OK to dismiss the message.
Tip: To copy this code into your WordPerfect program to create a working macro, see here.
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.")
• Example 2. Play it in the current document. Starting at the current cursor position (or at the very top of the document before all format codes) it will stop at each table in the document (in its first cell) and display the table's name. Click OK to search for the next table, or click Cancel to stop searching at that point.
Important: As noted above some tables in a given document might have the same name (e.g., TABLE A) if they were produced by copying a table and then pasting that table into various places in the document. See Renaming tables in a document below.
Tip: To copy this code into your WordPerfect program to create a working macro, see here.
// Macro code begins here
vCount:=0 // (initialize a counter)
// First check if the cursor is already in a table; get table's name:
Messagebox (vAns;"This table's name is -"; vName; OKCancel!)
If(vAns=2 or vAns=7) Go(TablesNF@) Endif
While(True) // (loop through all tables)
SearchString(NToC(64393)) // (<- [Tbl Def] code's numerical value)
// When a table is found:
// If there's a [Tbl Def] code on the right, skip past it:
If(?RightCode=10964) PosCharNext Endif
// Center cursor location vertically on screen if possible:
If(?Substructure or ?GraphicSelected) Go(GetName@) Endif
// Get the table's name, display it in a message & optionally quit macro:
Messagebox (vAns;"This table's name is -"; vName; OKCancel!)
If(vAns=2 or vAns=7) Go(TablesNF@) Endif
MatchSelection // (reset parameter to search command's default)
Messagebox (; "End of search"; vCount+" tables found by this macro")
// Macro code ends 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.
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).
¤ To learn more about naming a table see WordPerfect's Help (F1) and search for "Naming tables".
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)
"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!)
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!)
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:
How to rotate cell contents to create "tear off" strips at the bottom of a page
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 in order 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 both 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.
* The bottom row was used in this example, but you can rotate the text in any table row, depending on your particular needs.
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.
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.
 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.
 Copy the selection to the clipboard with Ctrl+C (or right-click on the selected cells, then choose Copy).
 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.
 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.
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.
 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.
 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.
 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.]
Decimal alignment in a column that uses the percent (%) symbol
If you use a table column with figures such as "5.75%", "12.60%", etc. ... do the percent symbols (%) wrap down to the next line when you try to align the column on the decimal points?
Noal Mellott on WordPerfect Universe (here) described a solution: Use both column formatting options (text and numeric) -- but set the text format wide enough to accommodate the percent sign.
For example, if the column's values should display numbers with 2 decimal places and a percent sign (as in the examples above):
 Place the cursor in the desired table column.
 Text format: Format the entire column with Table, Format, Column, "Align contents in cells: Decimal Align". Set the "Digits after decimal" to 4. Click OK.
 Numeric format: Format the entire column with Table, Numeric Format, Column, Percent (radio button). Set the "Number of decimal places" to 2.
Generally, adding 2 digits in the Text format dialog to the number of decimal places you need in the Numeric format dialog should work.
How to use a table to format vertical text so that it can be placed anywhere in the document
This is a general method that you should be able to adjust to suit your needs.
The idea is to create a simple table inside a small movable text box to create a section heading or page identifier.
Here, it was placed along the page margin -- but it could be paced anywhere else, including inside a header, footer, or watermark.
For example, here's a 2-column, 1 row table (with most cell borders removed) inside a movable text box (with all box borders removed). A table cell vertical border lines up with the page margin guideline to provide an interesting effect. The number was formatted in a large bold font, and the text in both cells was centered vertically.
When the following method is done once the result can be reused (with the same or different text) in the currrent or any other document.(This might be best done in a new empty document to see how it works.)
Create the table that will contain the text.
• Click on Table > Create > (2 columns 1 row) > Create.
• Make these suggested changes to the program's default table settings by right-clicking in a cell, and choosing Format:
Horizontal = Center; Vertical = Center; Inside cell margins = 0"
Horizontal = Center; Width = 0.300"; Inside column margins = 0"
Row margins = 0" (or use custom top/bottom settings)
Horizontal = Center; Size = 2 columns, 1 row;
Position on page = Center; Width = 0.300";
Inside margins = 0"
• Then - click Apply, then OK.
Enter the text in the table.
• In the left cell, enter the text -- with each letter or number followed with a hard return (Enter key). The table will expand downward as you fill the cell with characters.
Repeat for the next cell. For example:
Note: You might need to right-click on a cell to ensure the cell's Horizontal and Veritical alignment is Center.
Tip (optional): In either or both table cells you could use rotated text as in the left cell here:
Rotating the text in a cell is best done inside the table before performing the rest of the steps below. Here's how:
(Optional: Increase the program's magnification level (View > Zoom) to make editing easier in small, confined spaces.)
▸ Instead of typing the text vertically in the cell, letter by letter with hard returns between them (as above), just type the text as a continuous string (which might result in a temporary cramping of the characters).
▸ Then right click on that cell, choose Format > Cell >Rotate > 90 degrees > OK. This puts the text inside its own text box. (Side note: Content to be rotated in table cells is always put inside a text box. At this point in this example you will now have a text box inside a table -- which shows how useful both "container-like" items can be in formatting text in novel ways.)
▸ Left click on that new box to use the Text Box Editor to edit its contents. For example, you probably should explicitly center the text in the Editor first (Format > Justification > Center) since the box is a different structure from the table cell it is in. Then you could expand letter spacing with Format > Typesetting. You can select the text and change the font, add bold, and so forth. When finished editing, click the Close icon on the property bar (or just use File > Close on the menu) to exit from that text box back to the table cell.
▸ Finally, you can expand that rotated box downward to (e.g.) reveal any hidden text in the rotated box: Rightclick on it, choose Size, then increase the dimension as needed. (This also expands the table row's height.) Click back in the document area when finished editing.
Remove all cell border lines except (optionally) the middle vertical border line.
• Right-click in the first cell, choose Border/Fill, then remove ("X") the Left, Top, and Bottom borders. Click OK.
• Right-click in the second cell, choose Border/Fill, then remove ("X") the Right, Top, and Bottom borders. Click OK.
• Click outside the table to exit from it.
STEP #4 (Optional but suggested)
Put the table inside a new (draggable) text box so that it is easy to position where needed.
• Open Reveal Codes (View > Reveal Codes). In the Reveal Codes window carefully select the entire table -- i.e., everything between (and including) the two [TblDef] codes. (Using Shift+arrow can make selection easier.)
• Copy the selection to the clipboard (Ctrl+C).
• Create a graphic box with Insert > Graphics/Pictures > Custom Box > Text Box > OK. This opens an empty 1-line text box with 8 drag handles (small squares around the box perimter)
• You can move the box: Move the cursor to the box perimeter until it changes to a 4-headed arrow. You can then drag the box anywhere on the page, including into the area near the edge of the page.
• Paste the copied table into the box with Ctrl+V.
• Resize the box by dragging the top/bottom/side drag handles to enclose the table more tightly.
Note that the graphic box's inside and outside spaces can be adjusted later by right-clicking the box and choosing Border/Fill > Advanced. Using a small amount of space allows document text to wrap around the box and its table.
• You can remove the text box's border later by right-clicking on the box and choosing Border/Fill and clicking on the empty icon (under "Available border styles") on that dialog.
• Drag the box to reposition it as desired.
☼ To copy the box, just select the [Box] code in Reveal Codes and use Ctrl+C. Or just right click on the box, choose Select Box, then copy it with Ctrl+C. It can then be pasted elsewhere (Ctrl+V), even into another open document.
☼ You can left click on the box's table at any time to change the text or add formatting to it. (Right click while in a cell and use Format to change (e.g.) a column width, etc.) Then click outside it to return to the document.
☼ If you right click on the box later you can choose Position to specific an exact position and/or "anchor" it to the Page or Paragraph or Character. By attaching it to the current Paragraph it will "travel' with that paragraph if you add or delete material above it.
☼ If you select just the [Box] code in Reveal Codes you can immediately save it as a QuickWord for later use in any document.
How to randomize a list of items - or even a block of sentences or paragraphs - using a table as a tool
[Here's a method adapted from one originally described by Charlie Cork and Roy "lemoto" Lewis at WordPerfect Universe here. It is similar to the method above which sorts paragraphs in reverse order, but instead it uses a simple, built-in table math function.]
▸ Back up your document before beginning.
▸ If you are new to sorting WordPerfect tables see the tips and notes in the short section above before proceeding.
• Select the block of items you wish to randomize with your mouse or keyboard.
The selection can contain lines with characters, spaces, WordPerfect format codes (e.g., Bold, Italics, etc.), symbols (Ctrl+W), and even graphic images. All items should all begin at the left margin (i.e., no tabs, indents, centering, etc.).
The next step will group the items into separate table cells in a one-column table.
¤ Very large amounts of material -- hundreds of items, items with lots of material, or heavily formatted materials -- might produce problems for a table when sorting the items. Remember that a WordPerfect table is also a mini-spreadsheet with over 100 built-in functions, not just a simple formatting tool.
Any such problem might depend in part on the available memory in your computer and/or the complexity of formatted items in the selection. Asking a WordPerfect table to do some really "heavy lifting" for which it was not designed might be asking a bit too much.
Hence you might want to
[A] break up the selection into smaller blocks and process them separately, and/or
[B] remove all format codes before using the selection in the method below.
Removing codes can be most easily accomplished by selecting the material, copying it to the clipboard (Ctrl+C), then pasting it with Edit, Paste Special, Unformatted text into a new blank document. Alternatively you can simply save the items as ANSI or ASCII (generic text).
¤ If you are using a WordPerfect Outline inside the selection, use Reveal Codes to ensure you are not also including an [Outline] code in the selection. Otherwise the randomized selection's outline items will not be properly re-numbered if that code is moved below other outlined items as a result of the next steps.
One easy workaround for the Outline problem is to first select just the [Outline] code in Reveal Codes, cut that code to the clipboard (Ctrl+x), and paste it above the desired selection (Ctrl+v). Then select the block of items to be randomized and proceed with the next steps. (You can relocate that code the same way later, if desired.)
• Create a table structure around the selected items by clicking on Table, Create.
The "Convert: Text to Table" dialog opens.
▸ Choose 1 Column, and set the Text Delimiters to "Paragraphs".
▸ Click OK. (Note that WordPerfect treats each item – i.e., text that ends with a hard return or similar format code – as a "paragraph".) The cursor will be automatically included inside the table in the first cell.
• Insert a new empty column to the left of the current column.
With the cursor in the first table cell, click on Table, Insert, Column (set to "1"), Before, OK. (It might help if you widen the resulting column to an inch or so.)
• Populate the new column with random numbers.
▸ Place the cursor in the first cell on the empty column. The Table property bar should be visible above the ruler:
▸ Display the Formula Toolbar: Click the f(x) button on the right side of that property bar. The Formula Toolbar will appear under the ruler:
[Tip: If the Table property bar above is not visible you can use Table, Formula Toolbar on the program's main menu to display the Formula Toolbar.]
▸ Define the formula: Click inside the empty formula field on the right end of the Formula Toolbar and carefully type the characters RANDOM(1) into that field:
▸ Insert that formula: Click the blue check marked button on the left side of that field to accept the formula and insert it in the first table cell. It should display a random decimal number (i.e., between zero and 1) in that cell immediately. (The actual number of digits displayed depends on the column's width.)
▸ Replicate the formula down to all subsequent table cells:
With the cursor in the first cell of the first table column (the one showing the random number) use the Copy Formula button on the Formula Toolbar (shown above -or- use the Table, Copy Formula choice on the main menu).
In the small dialog that appears, click the radio button labeled "Down" and choose the number of cells to copy the formula into to fill the column (one less than the number of rows; you can type the number into the number field or use the spinner). For example:
[Tip: If you don't know the number of cells required to fill the entire column just type an arbitrarily large number (e.g., 111111) into that field; the program will pop an error message and show the maximum number you can use.]
Click OK to dismiss the dialog.
The first column of the table now contains random decimal numbers in each cell. (Since we used a positive number in the RANDOM() function each number will be between zero and 1.)
[Optional: You can now remove the Formula Toolbar with its Close button.]
• Now, sort the table:
▸ Place the cursor anywhere in the table and click Tools, Sort on the program's main menu.
▸ In the "Sort by" field, choose "First cell in a table row."
▸ Click Sort.
The original column of items will now be sorted randomly, since they were temporarily "attached" to the random numbers in the adjacent cells in the first column.
• Next, remove the new column. Since the new random-number column has done its work ... with the cursor placed in that column, remove the column with Table, Delete, and the Columns radio button field set to 1. Click OK.
You should now have just a 1-column, randomly sorted table.
• Finally, delete the table structure (but not the table's contents) to return the original material back to ordinary text:
▸ Click on Table, Convert.
▸ In the small "Convert: Table to Text" dialog that appears, choose the two radio buttons "Convert tables to text" and "Separate text with paragraphs (hard returns)."
▸ Click OK.
Tip: Your randomized items might need some editing to add or remove extra hard returns, etc. (For large amounts of text, removing extra hard returns can be done very quickly with a macro: see DelCodes in the Library for a macro, DelExtraHR.wcm.)
[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).