| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
| Page updated Dec 13, 2019
Main tips page | Browse more tips
| Delay Codes
Some pages on this site that use Delay Codes or are related to it:
• 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 Suppress was used
• 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.
Some macros and templates:
• SUPDELAY (macro) - Automatically set up "second pages" with "page identifiers" using both the Suppress and Delay features
• LETTERHD (template) - An example of an automated and customizable letterhead template using suppress and delay codes to automatically create different page identification items on subsequent pages (if there are subsequent pages)
• BACKGROUNDFILL (macro) - Create a user-specified "background fill" for the page, extending to outside page margins (or at any desired printable location); uses a delay code when you only want the fill on the current page
• LINEBORDERS (macro) - Create a fixed, user-specified line border around pages outside page margins (or at any desired printable location); uses a delay code when you only want the fill on the current page
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 should be delayed from starting until "X" pages from the location where they were first inserted.
• Either you or the program can create (insert) them.
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 or when there is a page 2.
This method is particularly useful with templates since it can help automate format settings in documents spawned by the template, such as a customized business letter template.
It's important to understand that WordPerfect can automatically create them in a document when it needs to do certain things asked of it. See some examples in the Notes and tips section below.
• Delay codes are actually made up of two related codes, visible in the Reveal Codes window:
◄ The first code tells WordPerfect what to do, and
◄ the second code appears on a specific delayed page (if and when that page exists) to tell WordPerfect where to start doing it.
☼ After reviewing the next "How To" section be sure to read the important Notes and tips below.
☼ There's another (and easy) way to stop displaying headers, footers, watermarks, and/or page numbers on individual existing pages: see the Suppress feature here.
How to create, insert, and edit delay codes
[From WordPerfect X9's Help under Inserting and editing delay codes — formatting, annotations and images added]:
"You can insert and edit delay codes. Delay codes allow you to suppress open codes* by specifying that the open codes take effect after a specified number of pages. Open codes can include codes for line numbering, fonts, tab settings, and margins.
For example, if on page 3 you [or WordPerfect] delay an open code by two pages, the code takes effect on page 5.
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 where that formatting is applied] and one at the end of the [material where that formatting stops]. For example, bold, italics, tables, columns, and paragraph styles are paired codes. [There are many others.]
* Open codes are often called single codes (or document codes). They normally apply their formatting at a specific location (such as the beginning of the document) and continue unless and until that formatting is replaced by another code of the same type.
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:]
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:]
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:]
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 [HPg].
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
 [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.
the first code of the [Delay] code pair to open the Define Delay Codes
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 problem:
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.)
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:
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.]"
In such cases as those above a hard page break [HPg] — created with Ctrl+Enter — would create an absolute
location for the start of the new or changed format setting, which would "travel" with it if more
material is added or deleted above that page break. Hence, no delay code is needed in this instance.
But in the absences of a hard page break the location becomes relative
to the top of the document, which is why you would see the first
[Delay] code of the pair of delay codes appear there, specifying a
fixed number of pages for the start location of that new setting.
This automatic insertion of a new delay code is WordPerfect doing what it needs to do — but it can sometimes cause confusion (and sometimes even document corruption) for both the program and you when there are conflicting settings inside these codes. (One symptom of this is is the appearance of many more such delay codes than you might expect for the current document formatting. Look inside them (see above) to see what they might be doing and if they are really needed.)]
 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
See next tip.
 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.
gives you a way to view and edit the contents of the delay code.
The first code of the
pair — usually (but not always!) found at the top of the document —
is the clickable
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.
 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.
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
See Footnote 1 (on the HeadFootWM page) for the method.