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

Page updated Apr 30, 2017

TabSet25 - Automatically set left tabs every 0.25 inches (to modify this amount see below)

Download TABSET25.ZIP (v1.3; 12/28/16; 11,888 bytes)

Written in WPOX8 but should be compatible with WordPerfect 8 and later versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 ( at the top of this page.

Downloading, Documentation, Modifications, and Support

Related pages -

•  How to create custom tab settings for outlines and bullet lists

•  Custom styles (includes creating, saving, retrieving, resetting, and removing them)

•  Several easy ways to play macros, etc.


Just play the macro to set new tab stops every 0.25 inches (up to the apparent program maximum a7 9.75 inches [40 tab stops]):

TabSet25 ruler bar

From a menu that appears you can choose to set the new tabs - 

•  for the currently selected text -- e.g., this is useful to "compress" the space adjacent to the numbers, letters, or bullets in lists or outlines when they are selected before playing the macro (tab settings in effect before the selection are restored immediately after the selection); or

•  starting at the top of the document and continuing forward; or

•  starting at the current cursor location and continuing forward.

The tab settings for any of these choices can be set relative to the left margin (the default) or from the left edge of the page (starting from the non-printing area).

The macro also sets three additional 0.25" tabs to the left of the margin, so that a back tab (<Shift+Tab>) following the new [Tab Set] code will "outdent" the following text in 0.25" increments. (Use more back tabs for greater outdenting.) These additional tabs are not shown on the [Tab Set] code, but they are there nonetheless.


¤  Tab settings inside separate WordPerfect substructures such as headers, footers,  text boxes, footnotes, etc., will apply to just that substructure if you choose to apply the settings inside them. (The program’s macro language considers them somewhat like a separate document with a top and bottom.)

¤  Tab settings affect paragraph formatting (anything that ends with a hard return or equivalent) so the [Tab Set] code that sets or changes them typically appears in Reveal Codes at the beginning of the current paragraph rather than at the cursor location (if different). This is by program design.

¤  WordPerfect seems to set a limit on tab stops: The maximum seems to be about 40 tabs, determined by WordPerfect for the document width and orientation.


•  You can remove individual tabs you don't need by click-dragging their triangle marks downward from the ruler bar with your mouse (see image above; if you can't see the ruler, enable View, Ruler on the WordPerfect menu).

•  To remove all of the tabs created by this macro
just locate and delete the new [Tab Set] code that started them in the Reveal Codes window. This will reset tabs to what they were at that point (e.g., the default is typically every 0.5").

•  To set all tabs back to the default (usually every 0.5") further down in the document (this assumes you used the macro menu's option to either set tabs starting at the top or set them starting at the cursor location; if you selected some text and used the option to apply the tabs to the selection they will be automatically reset following the selection):

1. Place your cursor where the default tab setting should begin.
2. Click Format, Line, Tab Set.
3. In the dialog that appears, click the Default button, then Close.

This places a new default [Tab Set] code at the cursor location.

•  Menu defaults for the macro can be set in the redlined User Modification Area of the macro's code.

For example:

The actual Tab stop values can be changed in the macro code's two TabSet() commands (0.25" is the default).

You can also set the variable vMenu to zero to let the macro play without displaying a menu.

To make such changes:

Open the macro for editing (Tools, Macro, Edit) and after making changes, click Save & Compile on the Macro Toolbar that should be visible.

•  To insert the new tab settings in every new document (via the default template):

1. Play the macro in a new, blank document. From the macro's pop up menu, choose to "Start at top document." Notice the new 0.25" tabs that now show in the ruler area, and a [Tab Set] codes appears in Reveal Codes.

2. In Reveal Codes, select the new [Tab Set] code. (It is easier to do this by locating the cursor next to the code and holding down the <Shift> key while you tap the <Arrow> key once.) Copy the selection to the clipboard with <Ctrl+C>.

3. Double-click the [Open Style: DocumentStyle] code in Reveal Codes to open the Styles Editor.

4. Paste the new [Tab Set] code into the Contents field with <Ctrl+V>, just to the left of any other codes.

5. Check (i.e., enable) the box at the bottom of the Editor, "Use as default." Click OK, and answer Yes to the confirmation dialog that pops up.


¤  Be sure to un-check "Use as Default" before exiting WordPerfect to prevent unwanted further changes to the template.

¤  If you want to restore things at a later date, just open a new document and double-click the [Open Style: DocumentStyle] code. Delete the new [Tab Set] code, enable the "Use as default" box, and click OK. Then un-check it again before exiting WordPerfect.

¤  To set other formatting defaults for future documents see "How to set default formatting for new documents: A step-by-step guide" here.

•  (Alternative:) To use the new Tab Set code inside a character style:

Once the new [Tab Set] code exists in the document you can select just that code in Reveal Codes, copy it to the clipboard, and use it in a new custom character style, perhaps named "TabSet25" (N.B.: Set the "Enter key..." to <None> and the Type drop list to Character).

If the style is saved to your default template it would be available for all new documents in the Select Style property bar's drop list. Just select the desired text and apply the style.

See more details on this method see the footnote at OutlineTabs.html#fn1. For more general information of custom styles see CustomStyles.html.

[Thanks to Noal Mellott at WordPerfect Universe for this tip.]

•  (Alternatives for those familiar with editing a macro or creating their own:)

Macro example #1

To use a small macro to set custom tab settings at the cursor location (or to a selection of text), the following is similar to some code in TabSet25. You can use it as a standalone macro with the 0.25" settings or with your own custom settings at the various tab positions.

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

// Macro begins:
// Set tabs stops for the selection every 0.25 inch from left margin
// (To set them from the left edge of the page change Relative! to Absolute!)
TabSet (Origin: Relative!;
{0.0"; TabLeft!; 0.25"; TabLeft!; 0.5"; TabLeft!; 0.75"; TabLeft!;
1.0"; TabLeft!; 1.25"; TabLeft!; 1.5"; TabLeft!; 1.75"; TabLeft!;
2.0"; TabLeft!; 2.25"; TabLeft!; 2.5"; TabLeft!; 2.75"; TabLeft!;
3.0"; TabLeft!; 3.25"; TabLeft!; 3.5"; TabLeft!; 3.75";    TabLeft!;
4.0"; TabLeft!;  4.25"; TabLeft!;  4.5"; TabLeft!;  4.75"; TabLeft!; 
5.0"; TabLeft!;  5.25"; TabLeft!;  5.5"; TabLeft!;  5.75"; TabLeft!; 
6.0"; TabLeft!;  6.25"; TabLeft!;  6.5"; TabLeft!;  6.75"; TabLeft!; 
7.0"; TabLeft!;  7.25"; TabLeft!;  7.5"; TabLeft!;  7.75"; TabLeft!; 
8.0"; TabLeft!;  8.25"; TabLeft!;  8.5"; TabLeft!;  8.75"; TabLeft!;
9.0"; TabLeft!;  9.25"; TabLeft!;  9.5"; TabLeft!;  9.75"; TabLeft!})  
// (max limit seems to be 9.75")
// Macro ends

Macro example #2

To set all tabs with the same space between them starting at the left edge of the page, use TabAdd() like the following 2-line macro, which sets them every 0.25 inches.

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

// Macro begins:
TabClearAll  // Remove existing tabs (required to set all new tabs with TabAdd)

TabAdd(0.0"; TabLeft!; 0.25")
// Macro ends

Macro example #3

To set tabs every 0.25" (which can be changed to some other fixed value) relative to the current left margin and also allow proper Back Tab settings outside (i.e., relative to) that margin here's a macro to do it. (It also works on selected text.)

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

// Macro begins:
// Sets tabs stops every 0.25 inches from the left margin - note that the
// next (bold) command could be set to some other dimension
// (e.g., 0.20). As written the spaces between tabs will all be the same.
vSpaceBetween:=0.25 // (sets dimensions for spaces between new tabs)
vSpace:=vSpaceBetween+"i"   // (adds an "i" for "inches")
// Convert current margin to inches:
vMar:=ConvertType(MarginLeft(); Inches!)
// Repeat as long as vSpace is less than Left Margin:
If(vSpace < vMar) 
    Repeat // Work backwards to find position for first tab stop: 
        vMar:=vMar - vSpace 
    Until(vMar <= vSpace)
// Store 40 tab settings in an array:
Declare(array[41]) // (specify array size)
    array[x]:=vMar  // (store margin setting for element "x")
    x:=x+1  // (increment array's element number)
         // Increase the stored value for margin setting; then repeat loop:
// Insert the new tab settings using the array's stored values:
TabSet (Origin: Relative!; {
array[1]+"i"; TabLeft!; array[2]+"i"; TabLeft!; array[3]+"i"; TabLeft!; 
array[4]+"i"; TabLeft!; array[5]+"i"; TabLeft!; array[6]+"i"; TabLeft!;
array[7]+"i"; TabLeft!; array[8]+"i"; TabLeft!; array[9]+"i"; TabLeft!; 
array[10]+"i"; TabLeft!; array[11]+"i"; TabLeft!; array[12]+"i"; TabLeft!; 
array[13]+"i"; TabLeft!; array[14]+"i"; TabLeft!; array[15]+"i"; TabLeft!;
array[16]+"i"; TabLeft!; array[17]+"i"; TabLeft!; array[18]+"i"; TabLeft!;
array[19]+"i"; TabLeft!; array[20]+"i"; TabLeft!; array[21]+"i"; TabLeft!; 
array[22]+"i"; TabLeft!; array[23]+"i"; TabLeft!; array[24]+"i"; TabLeft!;
array[25]+"i"; TabLeft!; array[26]+"i"; TabLeft!; array[27]+"i"; TabLeft!;
array[28]+"i"; TabLeft!; array[29]+"i"; TabLeft!; array[30]+"i"; TabLeft!;
array[31]+"i"; TabLeft!; array[32]+"i"; TabLeft!; array[33]+"i"; TabLeft!;
array[34]+"i"; TabLeft!; array[35]+"i"; TabLeft!; array[36]+"i"; TabLeft!;
array[37]+"i"; TabLeft!; array[38]+"i"; TabLeft!; array[39]+"i"; TabLeft!;
array[40]+"i"; TabLeft!})
// Macro ends

- - -
Note: Macros #2 and #3 are based on macros posed by Larry Lewis at WordPerfect Universe here.