| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
| Page updated Jul 16, 2020|
Main tips page | Browse more tips
Custom styles - Creating custom styles; Saving custom styles to your default (or other) template; Retrieving custom (user) styles from another document or template; How to remove the new style from the default template
Mark a custom style for automatic inclusion in a Table of Contents
Adding emphasis to
Miscellaneous tips for inserting and using graphics (a form of style) in a WordPerfect document
Alternative heading styles - A "Stepped" style; Legal-number-style headings and other automatically numbered headings; using the Columns feature
About text styles ...
□ Styles are design
elements — such as bold, italic, extra large font, or colored
text — that can be applied to text.
As the term is used
here — and as WordPerfect's Help module defines them — styles are "a
collection of formatting attributes" that users can create for
Once created (and saved) they can be reused in other documents by simply inserting the style (or selecting some text and applying the style) by choosing it from the "Select Style" drop list on the text property bar, or by using Format, Styles, Insert on the main menu.
Though text styles are easy to create and
use, some "WordPerfectionists" never use styles,
preferring to directly control formatting in the text itself, where all
format codes are clearly visible in Reveal Codes. [See Footnote
1.] Still, they have several advantages, as discussed on this page.
□ Styles are special
format codes that act like containers.
They usually hold several
formatting codes, but they can even
hold text (but see Footnote 2), graphical items, tables, watermarks, margin
settings, and even other styles ("nested" styles).
Moreover, the items inside a style code are relatively immune from global operations (such as Find and Replace) and casual user editing or accidental deletion.
Since WordPerfect is a "stream oriented" program, styles take effect until either discontinued, replaced, or removed by another code. You can see (in Reveal Codes) just what is happening with such formatting by looking for various On and Off codes for a particular format to verify where a style begins and ends, or to check problems with overlapping or competing codes.
They are very easy to apply to text in your document,
and may be suited for a variety of tasks. They can give a consistent
look to the document, and they have the big advantage of being
globally changed simply by editing any single instance of a particular
style in a document.
[This requires that a checkbox, "Automatically update style when changed in document," be enabled in the Styles Editor for that style. Of course, if you share the document with others, let them know about this setting or they might be surprised to see global changes when none were expected!]
□ Even some things we
tend to think of in WordPerfect as separate features are in fact a special type
Types of text styles
There are three general types of WordPerfect text styles (for some tips on graphic styles see here):
• Character — typically these are applied to selected text (i.e., text you first select with mouse or keyboard), and are usually limited to applying a different font or combination of font attributes (bold, underline, color, etc.), or perhaps new page margin settings or paragraph margin adjustments. They generally will override any Paragraph styles that might be applied at the current cursor location (see exceptions on the CustomStyles page here).
• Paragraph — these affect entire paragraphs (up to the point where you press <Enter>); typically, you use them for headings, titles, outlines, etc. They generally will override the DocumentStyle settings or other formatting.
Note: Because short text phrases are often used as headings or section titles, WordPerfect comes with several standard Paragraph styles (Heading 1 through Heading 5), available from the drop list on the Text property bar. They are also set up ("marked") to be included in a Table of Contents.
• Document (a/k/a "Open") — applies to all text in a document from the cursor location forward until another style is encountered (if any). Typically these styles are used to set formatting for the remainder of the document (or to a point where another Document style replaces it).
Note: The initial style at the very top of a document (seen in Reveal Codes as [Open Style: DocumentStyle]) is a Document style; it is inherited from the template that spawned your document and it sets up initial formatting for the document. This style can be edited to modify it by double clicking its code in Reveal Codes, as explained here.
The type of style in effect in a document — Character, Paragraph, or Document — should be visible on the code itself in Reveal Codes. Just hover your mouse cursor over the [Style] code (or place the cursor to the left side of the code) and information about the style should appear.
It is also important to note that the first two style types — Character and Paragraph — are paired-code styles.* The pair of codes — an On code and an Off code — that makes up the style "brackets" the intervening text (you can see them in Reveal Codes). If you delete either one of the pair of codes, you will delete both codes.
However, Document styles are produced by a single
code that remains in effect until replaced by another style.
Tips and examples
☼ Steps to CREATE a style [see also the Examples below]
■ Recommended for newcomers - includes step-by-step detail, images, etc.:
Custom styles - Creating custom styles; Saving custom styles to your default (or other) template; Retrieving custom (user) styles from another document or template; How to remove the new style from the default template]
■ Recommended for users who know how to do it but might not remember the general method:
• Click Format, Styles.
• Click Create to bring up the Styles Editor.
• In the Styles Editor, type a name for the style in the Style name box (12 characters maximum).
Give each style a unique name to prevent replacing existing styles in a combined document that have the same name.
• Type a description for the style in the Description box.
• Choose a style from the Type list box. [N.B.: See Types of Styles above.]
• Specify the formatting:
Using the Styles Editor's toolbar, apply any style attributes such as Bold, Italics, etc.
You can also use the Editor dialog's menu for things like setting tabs, page margins, etc.
• If you want to define what function the Enter key performs when the style is applied, in the "Enter key inserts style" list box choose -
(A) another available style, if desired;
(B) <Same Style> if you wish to "chain" the style used (N.B.: this generally applies to Paragraph styles; further, you can "escape" from the style with the RightArrow key to move past the [Style] code);
(C) <None> (the default), so that pressing Enter returns to the style that existed before the new style was inserted (N.B.: this will be the [Open Style: DocumentStyle] set at the very top of the document if no other style precedes it).
• If you want to display the codes that take effect when a style ends, enable the Show ‘off codes’ check box.
• Click OK twice to return to the document.
• Note that the new style will also appear in the Select Style list on the text property bar as well as in Format, Styles.
☼ See also "Creating or modifying outline styles." (WordPerfect outlines are a form of Paragraph style.)
☼ You can also create a style quickly by using QuickStyle. See WordPerfect's online Help [the <F1> key] or click here.
☼ For temporary work — i.e., copy the format of text and apply it elsewhere in the document — you can use QuickFormat. See WordPerfect's online Help [the <F1> key] or click here.
☼ You can quickly edit — i.e., CHANGE — an existing style in the current document by double-clicking the [Style] code in Reveal Codes. The Styles Editor that appears has a menu and toolbar which you can use to add format codes to the Contents pane in the Styles Editor. The changes made this way will be stored in the current document. (The information here on creating a custom style should help you with editing a style, saving it as a custom style, etc.)
Important tips and a caution about editing (or creating) styles within other styles from Noal Mellot from a post on WordPerfect Universe:
"[WordPerfect] styles accept many codes, but some of the more complex codes (table, header, footer, graphic or an open style) cannot be created or edited inside the style itself. They can only be created or edited in the ordinary document screen, whence you can cut and paste them into a style.
Some codes encapsulated in a style (via the Styles Editor) cannot be modified once there (WP runs a message telling you so [or the program might simply freeze]). In these cases copy such a code back into the document, modify it there and then re-copy it back into the style.
For example, you might have trouble editing a header and delay/discontinue codes related to it inside a style. If so, cut [Ctrl+x] the codes out of the style and pasting them [Ctrl+v] in the ordinary document screen. Edit them there and then paste them back into the style."
[Also: If you wish to create (cf. edit) a delay in the appearance of some feature — such as a new header or footer — that will work automatically in all new documents, you should set up the delay, etc., in a separate, new blank document and test it there. Then carefully copy the [Delay] code (which is a form of style) back into the Contents pane of the initial style code, using one of the methods described here. You should do it this way because trying to create some styles within another style — "nested" styles — can cause the program to freeze. (This problematic issue of creating nested styles was described in the same WordPerfect Universe thread as Noal's post above (e.g, see here.)]
☼ Change the formatting of just a portion of the style's text: If you have applied a Character or Paragraph style to some text (which, as noted in the previous section, are paired-code styles) and "Automatically update style when changed in document" is enabled in the Styles Editor for that style, you can change the formatting of a portion of the text to which the style was applied by selecting that portion of text first, then apply the formatting (e.g., italics).
[Note the emphasis on portion: If instead you select all the text to which the style was applied — or apply the formatting first with a toolbar button or shortcut key (e.g., by using Ctrl+I) — this will tell WordPerfect to apply it to the entire style's text by adding the new formatting code inside the [Style] code. (You can always edit the style code to remove this formatting. See the previous tip.)]
☼ Insert blank lines or additional text text inside a style's text: Position your cursor in the body text to which a style (including an outline style) has been applied, and then insert a line break with <Ctrl+Shift+L>. This inserts a [Ln Brk] code in Reveal Codes. Line breaks also preserve any previous paragraph indentation (Format, Paragraph, Indent).
☼ "Close up" the space between a Heading (or other paragraph) style and the following paragraph: Assuming you add a hard return (<Enter> key) immediately following a Heading paragraph style, you will get a full-height space between the Heading and the next paragraph. You can shrink it by editing the existing Style (see above) in several ways.
• You can shrink the space by editing the existing Style (see above tips) and adding a Line Spacing code ([Ln Spacing]) in the style's Contents pane, in front of [to the left of] the existing codes there.
Just use the Editor's Format, Line, Spacing menu choice to reduce the line spacing for just that paragraph style.
Example screen shot here using 0.5 spacing in Heading 2.
You might want to experiment with different settings. This change will apply to just the text to which the paragraph style is applied and just in the current document. Following the style, the line spacing will return to whatever it was before that style was applied (usually, 1.0).
[See here for more on creating a custom style, editing the style, and saving it a custom style, etc.]
• Alternative (from a method posted on WordPerfect Universe) using an Advance code:)
"Spacing Before and After" with a Heading style
 Either create a new paragraph heading style with Format, Styles, Create (see above) -or- edit your existing paragraph style with Format, Styles, <stylename>, Edit (see also a tip above).
Either way, be sure to set "Enter key... <None>" and choose Paragraph as the Type.
 At the bottom of the Styles Editor dialog window, be sure to check (i.e., enable) the box, "Show off codes."
 In the Contents window of the Styles Editor, place the cursor before [to the left of] all codes. Then, on the Styles Editor menu, click on Format, Typesetting, Advance to bring up the Advance dialog. Click the "Down from insertion point" radio button and set the Vertical distance to (for example) 0.15". Click OK.
This adds a bit of extra spacing above the Heading style's text.
 Position the cursor in the Contents window after [to the right of] all codes — especially after the "Codes to the left are ON, codes to the right are OFF" code. Click on Format, Typesetting, Advance to bring up the Advance dialog. Click the "Up from insertion point" radio button and set the Vertical distance to (e.g.) 0.15".
In this example this restores the setting you made in step #3 by shrinking the spacing below the Heading style's text an equal amount.
 Click OK twice to return to the document.
Note: Normally, 12-point text gives 6 lines per inch, or 0.167" between lines. The above method adjusts the inter-paragraph space to 0.017" (0.167-0.150). This setting assumes you will have a hard return (i.e., a blank line) between the headings and the following paragraphs, so it adjusts the amount of inter-paragraph blank space by reducing it. Be sure to adjust the vertical down/up amounts [steps 3 and 4] to match your particular needs.
You can also use this basic method to either expand the space before the paragraph Heading style or shrink the space after the Heading style. Or, as above shown, you can do both in the same style simultaneously.
• For some other things you can do with paragraph styles:
See "Need a different look in your document's headings".
See also this macro: Block protects paragraph styles.
☼ End ("break out of") a previously applied style mid-way in the style's text: Position your cursor where you want the current style to end and press <Shift+Enter>. This is a fast way to "end" a style. Note that if the cursor is at the end of the style's text — but still in the style's format "zone" — it will simply move outside that style's zone. [Thanks to Noal Mellott at WordPerfect Universe for this tip.]
☼ Convert a custom style into normal formatting codes: If you click Format, Style, then select a custom style, then click Options, Delete ... you can choose to "Leave formatting codes in document." This is an easy way to convert a custom style into normal formatting codes. (You can't do this with standard "shipping" styles.) N.B.: If you have duplicate style names in the list, you should delete the style stored in the current document, not the template. (The location — current document or template — of each style is shown on the right side of the Styles dialog.)
Here's a three-line macro that will do the job. Be sure to change "MyCustomStyle" below to the name of your actual custom style (but retain the quote marks). Note that the code redirects the macro to a Label() if the style does not exist. (To copy macro code here into WordPerfect, see CopyCode.html.)
StyleDelete (Style: "MyCustomStyle"; Codes: LeavingCodes!; Library: CurrentDoc!)
☼ Save them for future use: By default, customized styles are saved with the current document, but you can also save them to your default template or other template so that they will available for all new documents based on those templates. You can also copy styles from one document to another. See the Custom Styles page here.
☼ Adjust what displays in the Styles dialog's Available styles list (and also in the Select Styles drop list on the Text property bar), and/or where to save new styles. (Session-specific settings.)
To do this, click Format, Styles, Options button, Settings.
The Style Settings dialog appears.
Note: Any changes you make to this dialog's settings are operational only for the current WordPerfect session. They are reset to their defaults when you next load WordPerfect. [To manually save specific custom styles to your default (or other) template later, see the CustomStyles page here.]
Left side of dialog:
The first three check boxes on the left side of that dialog are enabled (ticked) by default.
Styles in current document: displays the styles for features, such as footnotes, hypertext, and tables of contents, that are in the active document.
Styles in default template: displays styles found in the default template file.
WordPerfect system styles: displays all styles for features, such as headings, footnotes, hypertext, and tables of contents.
The fourth check box, Styles from additional objects template, is disabled (un-ticked) by default. You can enable it to display styles in an additional objects template if you use one.
The two radio buttons below the first three check boxes let you display just WordPerfect heading styles or display all styles (i.e., heading styles and all other system styles such as headers/footers and comments).
Most users will typically use the first radio button setting, unless there is a reason to display every style on your system.
These checkboxes and radio buttons control what appears (displays) in the available styles list.
Right side of dialog:
The three radio buttons on the right side of the dialog let you customize where WordPerfect should automatically save (i.e., store) newly created styles — i.e., in the current document, or the default template, or the Additional Objects template (if used).
The default choice is "Current document," which is the typical choice for most users. This is because they don't want every new style created during the current session to be automatically saved in their default template.
However ... you can always save any custom style to your default template (or to a custom template) later, using the method here.
☼ Other references:
• Some older manuals that might still be available:
▸ A good, basic introduction to styles can be found in Laura Acklen's Absolute Beginner's Guide to WordPerfect 12 (or other version), which is inexpensive. Check Amazon.com or other bookseller.
▸ A more comprehensive guide is Laura Acklen and Read Gilgen's Special Edition: Using WordPerfect 12 (or other version).
[Both books are published by QUE.]
• A good peer-supported (free) website to join: WordPerfect Universe (http://wpuniverse.com/vb)
Example 1 - Create a custom style to automatically convert selected text to UPPER case
• Click Format, Styles, Create.
• In the "Style name:" field, give the style a name.
• Add a description if desired in the next field.
• In the "Enter key inserts style:" field, select <None>.
Note: This field lets you choose another style to become active when the Enter key is pressed; here, you most likely want normal body text to become active, so <None> will default to your body text style. If you select <Same Style>, WordPerfect will continue applying the same style to the next paragraphs — that is, the text following a press of the Enter key — until you deliberately choose another style from the Select Style list on the Text property bar (or from Format, Styles).
• In the "Type:" field, select Paragraph for headings and other single paragraph types of text, or select Character if you want to apply the style to a word or a few phrases (then, after applying the style, press the right arrow key to skip past the "ending" style code and resume typing normal text). If you select Document (open), the style will be used until you deliberately select another style or choose until you choose <None> from the Select Style list.
• In WordPerfect 9 and later, check the box, "Automatically update style..." if you want all instances of the style in the document to change if you change any single instance of the style's formatting. (Most people probably want this to happen.) In WordPerfect 8 and earlier, you will not see this checkbox; rather, use the "paired-auto" version of the style in the Type field.
• Put the cursor in the "Contents:" field (or "pane"). This is where the actual style's formatting codes (and any text characters) are stored. (See also "Tricking WordPerfect" in the next example below.)
From the Styles Editor's menu at the top of the dialog, click Format, Font, and check the Small caps box; then click the Relative size button and choose Large. This inserts two format codes in the Contents field.
Note the "Show 'off codes'" checkbox: If you enable it you will see a long, "text placeholder" code appear:
[Codes to the left are ON - Codes to the right are OFF]
This code can be selected (it's easier to use <Shift> plus an arrow key) and a paired format code applied to the code itself, such as relative size codes, bold or italic codes, etc. This tells WordPerfect to apply the format to everything in the paragraph, then discontinue it (turn it off) immediately following the end of the paragraph. [For a good example of this, see "Mark a custom style for inclusion in a Table of Contents.] You can also add some codes before and after this long code without selecting it first, to turn certain formatting on and then change it back (e.g., change from one line spacing back to another spacing).
If you are creating a Character style (see above), you don't need to select this special [Codes to the left...] code. Just use the Editor's menu or toolbar to add the format code(s) to the left of the [Codes to the left...] code (assuming it is visible in the Contents pane).
You can add text characters, such as a colon (:), following (to the right of) the [Codes to the left...] code. This will add the colon automatically to any body text to which you have applied the style.
• Click OK twice to return to the document. The new style will appear in the Select Style list on the text property bar.
• Apply the new style to some selected text. It you created a Paragraph style, the style will stop with the next paragraph. If you created a Character style, you can insert the style and then start typing in lower case (when finished, press the right arrow key once to skip past the style code), or type the text, select it, and then apply the Character style. You can re-edit the style by double clicking its [Style] code in Reveal Codes.
The main virtue of this example — and all Paragraph and Character styles — is that if you enabled "Automatically update style..." you can change any one instance of the style's formatting and all instances will change in the current document.
This makes it very easy to instantly "tweak" the style's text throughout a long document.
[Tip: If you share the document with other WordPerfect users, be sure to tell them about this feature so they won't be surprised when they change one item only to find all similar ones change, too.]
In Reveal Codes, you can double-click the style code to edit the style.
You can add this custom style to your default template or any other document. See here for more on saving, importing, or removing custom styles.
Some things cannot be inserted directly in the Styles Editor's Contents pane from the Styles Editor's menu or toolbar. However, you can create them in the document itself and then copy them from the document into the Contents pane.
For example, if you want to delay margin settings (or other formatting) to the second and subsequent pages, you can use a [Delay] code on the first page, then copy that code into the initial Document Style, where it will be hidden from view and less likely to be accidentally deleted. See here for instructions.
Some custom style formats are difficult to create just by using WordPerfect's QuickStyle (Format, Styles, QuickStyle).
For example, setting up a custom paragraph style (see basic steps in the preceding section) that makes all text in the paragraph (or selected paragraphs) relatively smaller (or larger) will probably require you to edit the custom paragraph style (Format, Styles, <style name>, Edit) and add the paired codes for relative size around the built-in single "placeholder" code you will see when you enable the box "Show 'off codes'" in the Styles Editor. (This single code shows up as "Codes to the left are ON - Codes to the right are OFF" in the Styles Editor's Contents field.)
In this example, you would select this single "Codes to the left ..." code (with <Shift+right arrow>) in the Contents field and then click Format, Font, Relative size, and choose a relative size to apply. The "Codes to the left..." code will then be bracketed by the paired relative size codes — which in effect means that the paragraph (or selected paragraphs) will be sized smaller (or larger) when the style is applied to paragraphs.
For another example of this technique, see Mark a custom style for automatic inclusion in a Table of Contents, which brackets this code with paired Table of Contents codes.
Note that you can select and bracket the "Codes to the left ..." code with any paired formatting codes using the Styles Editor's own Format menu, such as italics or a new font. You can also add an Indent or Tab code at the beginning of the string of codes.
Example 3 - Create a style using a macro (Advanced users)
Footnote section ▸
One of the big advantages of WordPerfect compared to Microsoft Word is that you don't need [custom] styles in WordPerfect. As Seth Katz said in a post on WordPerfect Universe:
Some Microsoft Word users might say that WordPerfect codes are a drawback, that they proliferate in a document in a confusing manner. Seth continues:
Starting with WordPerfect 10, Corel included Text Variables (Insert, Variable), a form of WordPerfect style that lets you place the same text in multiple document locations.
Note that you can include text inside any style code by editing the style and including text characters along with the style's other format codes. But Text Variables can be more convenient, especially with larger blocks of text.
Further, it has been reported that including text inside a Style can prevent the document from being opened in ("ported to") Microsoft Word, so it's probably best to use such styles only in WordPerfect documents that are meant for other WordPerfect users -- or for other uses, such as simply printing the document or publishing it to PDF.
You can, of course, convert selected text's case with a macro.
For example, here's a macro that will convert the current sentence to all UPPER-case. (To convert just the current word, replace the parameter in the SelectOn command with WordMode!. You can also add other commands immediately after the ConvertCaseUppercase command, such as AttributeRelativeSizeToggle (Size:Small!).)
The first segment of the macro takes into account the possibility that something greater than a sentence might already be selected, such as the current paragraph. In that case, the macro will position the cursor at the beginning of the selected text before processing the text.
To copy macro code here into WordPerfect, see CopyCode.html.
And here's a macro that converts the currently selectred sentence to all lower-case, taking into account the possibility that the first letter of the sentence bight be automatically capitalized by WordPerfect's QuickCorrect Format-As-You-Go feature. Moreover, it takes into account the possibility that (1) something greater than a sentence might already be selected, such as the current paragraph; and (2) the sentence begins with a format code or non-alpha (i.e., not an A-Z or a-z) character. (To copy macro code here into WordPerfect, see CopyCode.html.)
You could add code immediately after the ConvertCaseLowercase command to change the selected text to all caps, etc. See the ConvertCase and AttributeAppearanceToggle commands.