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

Barry MacDonnell's
Toolbox for WordPerfect

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

Page updated Oct 9, 2016

WordPerfect Tips
Main tips page | Browse tips
Delay Codes

Some pages on this site that use Delay Codes or are related to it -

•  SUPDELAY (macro) - Automatically set up "second pages" with "page identifiers" using both the Suppress and Delay features

•  Suppress (tip) - The Suppress feature -- a special format code that lets you stop the display of a header, footer, watermark, and/or page number on the specific page where it was used

•  LETTERHD (template) - An automated letterhead template

•  BACKGROUNDFILL (macro) - Create a user-specified "background fill" for the page, extending to outside page margins (or at any desired printable location)

•  LINEBORDERS (macro) - Create a fixed, user-specified line border around pages outside page margins (or at any desired printable location)

•  Pleading (tip) - Modifying the legal Pleading feature

•  Transcript (tip) - Formatting a legal Transcript document

•  Reset page margins (tip) - Reset them on page 2 (if there is a page 2)

•  How to delay headers, footers, or watermarks to another page (tip)

•  Print your letterhead page from one printer tray, and second and subsequent pages (or envelopes) from another tray or slot (tip)

•  Two-tray merge printing (tip) - Print letterhead stock from one tray, the remainder of the merge document from another tray

•  Hide the [Delay] code (advanced tip) - You can hide the [Delay] code inside the document's initial [Open Style] code to prevent accidental deletion or movement of the [Delay] code.


WordPerfect menu choices (below) refer to the <WordPerfect> menu (right-click on the top menu bar for a choice of menus). If you use a <Microsoft Word> menu, the choices might be absent from your menu (but not from the program), or they might be found under another menu selection. See here for more.

What are "delay codes"?
Why and when do they appear in the document?

Delay codes are special format codes that act as "containers" for other format codes that you wish to delay starting until "X" pages from the location where they were first inserted.

Example: If you want to automatically increase left and right page margins on page 2 (say, from 1.0 to 1.5 inches), then you can use a delay code (see next section) on page 1 to instruct the program to make the change starting on page 2, if there is a page 2. This method is particularly useful with templates since it can help automate format settings in documents spawned by a template.

Note: The WordPerfect program will automatically create them in a document when it needs to do certain things asked of it. See examples in the Notes and tips section below.

Delay codes are actually made up of two related codes, visible in the Reveal Codes window:

Delay Code #1◄ The first code tells WordPerfect what to do.

Delay Code #2 ◄ The second code appears on a specific delayed page - it tells WordPerfect where to start doing it.


☼  After reviewing the next "How To" section be sure to read the important Notes and tips below.

☼  To stop displaying headers, footers, watermarks, and/or page numbers on individual pages, see the Suppress feature here.

How to create, insert, and edit delay codes

From WordPerfect X7's Help (italics, comments, and images added):

"... You can insert and edit delay codes. Delay codes allow you to suppress open codes [i.e., single format codes that normally start special formatting at the current location, which continues until the formatting is replaced by a similar (but different) format code] by specifying that the open codes take effect after a specified number of pages.]

For example, if on page 1 you (or WordPerfect) delay an open code by two pages, the code takes effect on page 3.

Such open codes can include codes for new line numbering, fonts, tab settings,  margins, et al.

You can delay any open codes; however, you cannot delay paired codes. Paired codes are codes that are made up of two codes — one at the start of the material the formatting is applied to and one at the end of that material. For example, bold, italics, tables, columns, and paragraph styles are paired codes. There are many others.

To create and insert a delay code:

1.   Click in the page where you want to start delaying [other format] codes. Often this will be page 1 but it can be any page.

2.   Click Format, Page, Delay codes. [A small dialog appears:]

Delay Codes dialog

3.   In the Number of pages to skip before applying codes box, type the number of pages for which you want to delay codes.

4.   Click OK. [The Define Delayed Codes window appears, its title shown at the very top of the main WordPerfect window:]

Define Delayed Codes window title

5.   Choose font and formatting options from the Delay codes toolbar.  [The toolbar contains several buttons; when you finish with using a button the codes it inserts will appear in Reveal Codes while you are still in the Define Delayed Codes window, not in the main document:]

Define Delayed Codes toolbar

6.   Click Close on the Delay codes toolbar.

Note that the [Delay] code remains at the top of the document -or- follows a hard page break. This code displays in Reveal Codes as [Delay:#] when you place your cursor just to the left of it and the # is the number of pages the code is delayed. The second code of the pair, {Delay Codes], appears on the delayed page.

To edit a delay code: 

1.   Click View, Reveal Codes to open Reveal Codes if it is not already open.

2.   Double-click directly on the [Delay] code. [See note #2 below for an example. Also see note #3 about a limitation when searching for [Delay] codes.]

Note especially that the [Delay Codes] part of the [Delay]...[Delay Codes] pair is not editiable (hence, it's not clickable). It's just used by the program as a "marker" to tell it where to start doing whatever is inside the [Delay] code, as described above.

3.   Modify any delay code options.

4.   Click Close on the Delay codes toolbar.

Notes and tips

[1] [WordPerfect 10 and later:] To delay setting new page margins or return (reset) them to the 1-inch default on page 2 of a document, see this tip.

Why? A small bug was introduced in WP10 (and still present in later versions) that requires a small extra step in the Delay Codes procedure.

[2] If you seem to be getting "random" delay codes in your document, or delay codes that appear for unknown reasons, you should first see what is inside thos delay codes. Here's how.

Double-click on the first code of the [Delay] code pair to open the Define Delay Codes window. Make sure Reveal Codes is open so you can see what is inside the [Delay] code, which acts as a sort of container for other codes (and, sometimes, text or other things, such as styles). The codes or other items you find there might tell you how they are getting "randomly" inserted into your document.

Also, see this post by 'CyndyZ' on WordPerfect Universe, in reply to someone who noticed typists having this same problem:

"... The typists may not be intentionally entering Delay Codes, but they are undoubtedly intentionally doing something which WordPerfect interprets as a request or need for a Delay Code. [Emphasis added.]

For example, if you change the bottom margin of a page, and that page begins in the middle of a paragraph, a Delay Code will be placed at the top of the page instead of a margin code. (If the page began with hard returns or at the beginning of a paragraph, a margin code would have been placed at the top of the page instead of a delay code.)

Repeated fiddling with margins is one thing that often causes extra Delay Codes, but it really depends on what else is going on in the document, where the cursor is when margins are changed, etc. Another thing that can result in lots of Delay Codes is importing documents from Word format - there are several Word formatting arrangements that are converted to Delay Codes when the document is imported to WP.

Lots of things like this can result in Delay Codes. In general I find that typists who are not particular about where their cursor is when they issue commands tend to wind up with more Delay Codes than others. People used to working in Word are particularly affected, probably because there are more occasions in Word (than in WordPerfect) where it does not matter - or matters less specifically - where your cursor is positioned when you issue a command.

And Delay Codes are a good thing, not a bad thing, but they can cause problems if they typist doesn't understand them."

And another post by 'CyndyZ' -

"There are ways to get delay codes in your documents without realizing it. For example, WP will automatically insert a Delay code in the following situations:

1. If you change the top or bottom margin on a page where there is a previous page and the two pages are not separated by a hard page break

2. If you start page numbering on a page where there is a previous page and the two pages are not separated by a hard page break

3. If you change the page size/type on a page where there is a previous page and the two pages are not separated by a hard page break

There are undoubtedly other examples, like that.

The common thread seems to be making formatting changes that affect the whole page when the page is not set off from the page before it by a hard page break.

(Converting documents from Word format is another way to get lots of Delay codes without knowing it...) ... [Emphasis added.]"

[3] You can't use Edit, Find and Replace to search inside [Delay] codes. This is a limitation of the program (and it applies to [Style] codes as well). You also cannot use a macro with Search() commands to search inside [Delay] codes.

However, you can use Find and Replace to find and/or remove these codes directly, as well as most other format codes in the text areas of the document. (See "How to remove them" here.) You just can't use Find and Replace to search inside [Delay] codes to find the sought after codes that might be inside them. Hence, once you find a [Delay] code you can double-click on it to edit it, or delete the code to delete its contents and the other member of the pair (see note #5).

See next tip.

[4] You can manually open an existing [Delay] code the same way you can open (to edit) many other WordPerfect codes. Just double click on the [Delay] code in Reveal Codes. This gives you a way to view and edit the contents of the delay code.

See next tips.

[5] As noted above, [Delay] codes are actually a pair of codes which can easily be deleted, even accidentally. (See tip #7 for a solution.)

Delay Code #1The first code of the pair -- usually (but not always!) found at the top of the document -- is the clickable one.

Delay Code #2The second (non-clickable) one is the "activation point" or "marker" where the code will take effect.

Like all paired WordPerfect format codes, if you delete one code of the pair the other code is also deleted -- and the format codes inside the [Delay] code are also deleted.

[6] To exit from inside the Define Delay Codes window, you can use the Close button on the Delay Codes toolbar or property bar (depending on which is displayed). Alternatively, use File, Close to close that window.

[7] [Advanced tip:You can hide the [Delay] code in the document's initial [Open Style] code to prevent accidental deletion -or- movement of the [Delay] code to some other page.

This is sometimes done for page 1 letterheads, where page 2 (if there is a page 2) will have different margins, headers and/or footers, etc. (See, e.g., the letterhead template in the Library.)

Obviously, you will want to make sure it is the [Delay] code you want to hide and not a code that the program inserted because it needs it.

See Footnote 1 (on the HeadFootWM page) for the method.