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

Page updated Nov 17, 2009
SUPDELAY - "Suppress and Delay" -
Automatically set up
"second pages" with "page identifiers" using Suppress and Delay codes

Download SUPDELAY.ZIP (07/12/04; 4,284 bytes)

Compatible with WordPerfect 6 and later versions

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

Downloading, Documentation, Modifications, and Support

For the "manual method" of setting up second pages with Suppress and Delay codes, click here.

See also -

Headers, Footers, and Watermarks - how to start, stop, suppress, change, replace, delay, overlay, and remove them

LETTERHD - Automated letterhead template

 

The SupDelay macro

The SupDelay macro is a simple and straightforward macro (you can also do the same things manually in the current document or in a template; see below). It is useful if the second and subsequent page of letters, reports, etc., have different headers, footers, watermarks, and margins, or when you don't want a page number on Page 1. Many people who use preprinted letterhead stationery, "printed-on-the-fly" stationery, or custom styles for reports often set margins and page numbering differently for the first page than for second pages.

For example, assume you want to use Header A, Footer A, and/or Watermark A for your first page letterhead design (or to supplement the design of preprinted stationery), or for the title page of a company report.

Assume you want to use Header B, Footer B, and/or Watermark B for other things (such as a name, date, document title or page number) on the second and subsequent pages -- if there are any such pages in a given document.

Also assume you have set new margins on Page 1, and want to return the margins to some preferred default setting on subsequent pages, if there are any. (Sometimes body text "runs over.") You don't have to create any header, footer, or watermark, but if you do the macro will suppress or delay the appropriate structures on the appropriate pages, like this:

Page 1: Page 2 and subsequent pages (if any):
Header A available (Header A discontinued)
(Header B suppressed) Header B available
Footer A available (Footer A discontinued)
(Footer B suppressed) Footer B available
Watermark A available (Watermark A discontinued)
Watermark B available Watermark B available
No page numbers on Page 1 Page numbering continues (if page numbering was turned on)
Page margins can be customized Page margins reset to 1" (the WordPerfect default setting, but this can be easily changed; see Reset margins)

Go to the top of your document and set up both varieties (A and B) of headers and footers, set up one or both watermarks, and set new Page 1 margins. Then play the macro. If you use SUPDELAY with letters, you can add some simple commands to insert the current date, several hard returns, etc., on the first page when the macro plays. See the comments at the top of the macro and the disabled code segment at the bottom.

You can play the macro in a template (while editing the template itself) for a permanent Page 1/Page 2+ setup, or play it in your current document before, during, or following text entry and header/footer setup.

Tip

  • On page 2 you can create a new Header A, Footer A, and Watermark A instead of discontinuing (stopping) them. The newly created elements will simply take over on page 2, automatically discontinuing the same elements that are on page 1.

The manual method of suppressing and/or delaying items in templates

For those who prefer to tinker with things -- and perhaps learn something in the bargain -- here's how to do what the macro above does by using choices from the WordPerfect menus.

Note that you can use this method in the current document (.WPD), but the above macro probably is more convenient if you have to do it often. For future documents, you probably will want to modify the template (.WPT) on which those documents are based. See the procedures below.

For new templates: Create a new custom template with File, New (or New from Project), Options button, Create WP Template. (See also "Custom Templates".) A new document will open, named Template1. You can create everything here, or import a previously created (one page) document with Insert, File.

For existing templates: Edit the template with File, New (or New from Project), select the template by name, then click the Options button and choose Edit WP Template.

  • Assuming you have used Header A and Footer A on the first page of the template, you can use Header B (and Footer B) for the second and subsequent pages. Do both of these things while editing page 1 of the template. That is, create all headers and footers on the first page.
  • Next, you need to discontinue (i.e., stop) Header A and Footer A on the second and subsequent pages (you don't need them anymore), and supress Header B and Footer B on page 1 (you don't want them to appear until page 2).
    • The first task (discontinue Header A and Footer A) is done with Format, Page, Delay Codes, 1, OK. Then click Header/Footer, Header A, Discontinue. Do the same for Footer A. You can also discontinue Watermark A, if it is used, and reset margins for the second and subsequent pages. Then click the Close button to return to the main template window. [For more information on Delay codes see Footnote 1 below.]
    • For the second task (suppress Header B, etc.), go to the top of the document and click Format, Page, Suppress. On the dialog that pops up, choose Header B, Footer B, and (probably) Page Numbering. Click OK.
  • Save the template with File, Save. If it's a new template, save it in the group category of your choice.

Tips

Bug alert

From Charles Rossiter, Corel C_Tech, relating to WordPerfect 11/sp1 through X3 (quoted here):

"There is a known bug [reported in Corel's support database, Answer ID 207691: "A Suppress code is deleted if the suppress criteria are changed... If any suppress option is removed, the suppress code is deleted."] -- So, if you set suppress criteria on page 107, so as to suppress the page header, and then add a suppress of the footer, you will probably have no suppress code, or suppress actions changed."

[UPDATE: Remedied in WordPerfect X4]

Two possible solutions:

1. From CyndyZ on WordPerfect Universe (here):

"...if you enter the Suppress code from scratch (no prior suppress code in existence) and you check all items you want suppressed, they will all properly suppress. But if a Suppress code already exists, when you go to put in another one, you'll see the item already being suppressed is already checked. You then check the additional items, and click OK thinking, as you should, that now all of the newly checked items plus the previously checked items will be suppressed. But unfortunately WP records only the new checkmarks as checked items, and unchecks the previously checked items.

Fortunately the workaround is easy, as long as you remember it: simply uncheck, then re-check any items that were already checked and which you do want to remain checked (suppressed)...."

2. From Charles Rossiter (continued from above quote):

"... To overcome this, you should delete the Suppress code to be changed, and then create a new Suppress code.

My records show this as a bug in WPWin11 with SP1, and later versions. The following macro can be used to replace the Suppress keystroke:

// Suppress.wcm macro begins here
// To remedy bug in WPWin11 and later which deletes
// a Suppress code;
// Menu could be edited to replace Suppress by this macro

nnn = ?PageSuppress

// Is Page Number Bottom Center selected? (value 2)
// or PageNumbering selected (value 1)

nnn =(nnn%4)

InvokeDialog (PageSuppressDlg)
Wait (5)
// Reverse current setting twice
SendKeys ("{Space}{Space}{Tab}") // Header A
SendKeys ("{Space}{Space}{Tab}") // Header B
SendKeys ("{Space}{Space}{Tab}") // Footer A
SendKeys ("{Space}{Space}{Tab}") // Footer B
SendKeys ("{Space}{Space}{Tab}") // Watermark A
SendKeys ("{Space}{Space}{Tab}") // Watermark B
Switch (nnn)
// Page NumberBottomCenter
CaseOf 2: SendKeys ("{Alt+n}{Space}{Tab}")
// Page Numbering
CaseOf 1: SendKeys ("{Space}{Space}{Tab}{Tab}")
// Neither
CaseOf 0: SendKeys ("{Tab}{Tab}{Tab}")
EndSwitch

// Macro ends here

[Ed. - To copy this macro into your own program, see here. You can assign this macro to a menu (replacing the original Format, Page, Suppress menu item), keystroke, or toolbar button; see here.]

Footnote 1


Important notes

  • 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. A small bug was introduced in WP10 (and still present in later versions) that requires an extra step in the Delay Codes procedure.
  • If you seem to be getting "random" delay codes in your document, you should first see what is inside the random codes. Delay codes are actually made up of two codes: the first [Delay] code tells WordPerfect what to do; the second [Delay Codes] code appears on the (delayed) page and tells WordPerfect to start doing it. Double-click the first code of the 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.
      • 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."

From: Headers, Footers, Watermarks... How to delay them to another page:

Cautions

  • One downside to using a [Delay] code: You can't use Edit, Find and Replace to search inside a [Delay] code. However, you can use F&R to remove these elements; see "How to remove them".

Tips

  • You can open an existing [Delay] code the same way you can open (to edit) many WordPerfect codes. Just double click on the code in Reveal Codes.
    • Note that Delay codes are actually a pair of codes. The first code of the pair -- usually found at the top of the document -- is the clickable one, and the 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, the other is also deleted.
  • To exit from 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.
  • 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. See Footnote 1 (on the original page).