Toolbox for WordPerfect
Macros, tips, and
templates for Corel®
WordPerfect® for Windows®
updated Apr 10, 2021
Main tips page | Browse more tips
Headers, Footers, and Watermarks - how to start, stop, suppress, edit, change, replace, delay, overlay, and remove them
► Page numbering
Page Numbering in WordPerfect - A page of links to basic and advanced page numbering topics and related tips
Using "Page X of Y" numbers inside headers and footers (footnote 6 below)
Page numbering outside the page margins - simulating page numbering outside the document's normal top and bottom page margins
► Page identification
SupDelay macro - Automatically set up "second pages" with "page identifiers" using Suppress and Delay codes
Page identification tips - Create even and odd page identification in headers or footers - Create a third type of "header" or "footer" for additional identifying information
Stamps - Creating "DRAFT," "COPY," and other identification stamps on the pages of a document
LetterHd - An automated letterhead template with second page identifiers in headers and footers
How to create "Continued on Page x" footers where "x" is the number of the following page
Using two footers simultaneously (one for page number, the other for separator line and filename, etc.) so that items do not overlap
Outside the margins - Creating text outside a document's page margins, along the edge of the page(s), using a watermark or text box
► Other related pages
Mixing landscape and portrait pages: How to maintain headers, footers, and page numbering at the top and bottom of all pages when you mix landscape orientation with portrait
Pleadings - Modify the legal Pleading feature (in Watermark B)
Can you use multi-page watermarks? See the note here.
A primer on 'Reveal Codes'
DynaHead - a macro to create dynamic headers (a/k/a "running heads" or "floating headers") -- i.e., headers that change page-to-page with the section, topic, or heading on the same page (-- also see the footnote on that page for simpler "running headers" and "running footer" macros)
• First things first - Headers or Headings?
• Some general things to know about headers, footers, and watermarks
▸ They are available as menu options on the Insert menu
▸ They are visible in Page mode but NOT in Draft mode
▸ They are "repeating elements"
▸ There are two "flavors" of each of these elements
▸ Some of their additional features are on the Property Bar
▸ Using page numbering inside headers or footers
... includes some tips ...
turning off normal page numbering;
stopping numbering inside headers/footers;
setting up "Page X of Y" numbering;
resetting numbering to another value midway in the document;
separate numbering schemes in the same document
• How to start (i.e., create) them, exit from them, and see them on screen
• How to stop or suppress them (3 methods)
• How to edit, change, or replace them (i.e., edit their contents)
• How to delay them to another page
• How to overlay them
• How to remove them
• Example: Modifying the current document or a custom template
These are common terms, but it helps to use the right one when you discuss issues with other WordPerfect users.
• Headers (and Footers)
These are format structures ("containers") that can contain text and (optionally) graphic elements and/or page numbering.
Headers are located inside (i.e., below) the page's top margin, between that margin's dotted gray guideline and the body text area. (See image above. Page margin guidelines are visible when View > Guidelines > Margins is enabled.)*
Footers are similar structures but they are located at the bottom of the page inside (i.e., above) the page's bottom margin.*
Once created, headers and footers automatically continue displaying their contents until they are either discontinued (stopped) or replaced (superseded). These formatting issues are discussed below.
* Inside? Outside? Note that here, "outside" the page margins indicates the areas that are conventionally referred to as "in the margin" (i.e., adjacent to the outside edges of the printed page -- where you see the "Page margins" box in the image above). But because we need to accurately reference where content can normally appear in WordPerfect we typically use the phrase "inside the margins" to mean anything inside the perimeter described by the (gray dotted) page margin guidelines. All else is considered to be "outside the margins".
Headings, on the other hand, are words or short phrases in the document's body text area
that introduce or divide a larger body of work, such as a chapter or a section of a
topic. (See image above.) They are created by typing some text and then (generally)
applying formatting in a way that visually sets them off from other
Once created, headings display their text only at their current location. Unlike headers (or footers) they can appear
anywhere on the page.
Tip (for Headings):
WordPerfect comes with several Heading paragraph styles (easily available on the text property bar or with Format > Styles). When these styles are applied to some text, they automatically apply their formatting to the text, such as a new font size, bold or italics, etc. They also are specially "marked" internally so that their text will be automatically included in any Table of Contents, as explained here.
Headers, footers, and watermarks are available to create, edit, or discontinue (i.e., stop) from the Insert menu on the top menu bar in WordPerfect.
• Can't find these items on the Insert menu?
The Insert > Header/Footer and Insert > Watermark menu choices, along with a few others mentioned on this site, might only be available when using the program in WordPerfect mode (i.e., on a <WordPerfect> menu: see note above) -- not when using the Microsoft mode. If you don't see those two choices, see here.
They usually contain text, but they can also contain graphics (images, lines, boxes, etc.) and even format codes (current date, filename, line justification, columns, tables, etc.).
Headers and footers can also contain page numbering (see left sidebar as well as the tips below).
Like page numbering (Format > Page > Numbering) they are considered "repeating elements" or "repeating substructures".
This is because they are designed to automatically display on more than one page even though you (typically) need only create them once in a document — unless of course you need to change their contents for various sections of the document, such as with book chapters.
The key word to remember here is display: They are not actually part of each page like body text. They are merely displayed (and will print) on the page where they were created — and including all following pages unless they are replaced or discontinued further down in the document. (More on this in the sections below.)
☼ Watermarks are particularly useful to display text and/or graphics on multiple pages. Since a watermark essentially lies "under" the main document's text it will not impact the main document's formatting — it merely "bleeds" its content into the document. (You can even used rotated text boxes inside a watermark to make use of the area outside page margins, such as is often done for document stamps; see examples such as DocStamp, EdgeText, and PrntCopy in the Library.)
¤ Unlike watermarks, headers/footers reduce the vertical dimension of the main body text area for any given top/bottom page margin setting. This means that the main text areas will shrink vertically whenever headers or footers are present compared to when they are absent. (The material inside the main text area doesn't shrink in size — just the area the material occupies.) If you add headers/footers sometime during editing this can cause existing body text to flow down to subsequent pages a bit differently, possibly affecting pagination. (Next note.)
¤ This issue of a possible change in text flow might be especially important with a pre-existing Table of Contents (TOC), List, Index, or cross-references, which are features that "point" to specific page numbers. Hence, these items should be re-generated if headers or footers are added anytime after these reference tools were created. This will ensure correct pagination in those features.
Related tip: Since re-generating the document refreshes any TOC, List, or Index area by temporarily deleting their entries you should not create (i.e., start) a header, footer or watermark when the cursor is inside these areas or their format codes will also be deleted. (See the re-generation section on the TOC page for this and other tips.)
Thus you have six easy ways to add extra information — often called "page identification" — to individual or multiple pages in your documents.
☼ One flavor of
a given element (e.g., Watermark A) is initially and
functionally the same as the
other flavor (e.g., Watermark B). Which you use is a matter of
preference, although some program features default to using a
particular flavor, such as the factory-provided Pleading
feature which uses Watermark B
(users of Pleadings who need an additional watermark would then use
Watermark A in their pleading documents).
☼ You can use either flavor of a given element more than once (i.e., sequentially, over one or more pages) in the same document, since the most recently created one will automatically stop (i.e., discontinue and supersede) the earlier one of the same flavor at that point, and then display its newer contents going forward in the document. The prior existing version will still display its contents up to that point. (This is a common task with books and other multi-section documents where Headers or Footers often change as you progress through the book or document.) See the various topics below, which will help give you control over these items.
☼ You can use both flavors of a given element simultaneously on the same page(s), much like an old-fashioned overhead projector which let you lay transparent film sheets ("transparencies") on top of each other to combine their projected information on a screen. [See the left sidebar for some tips (e.g., using two footers) using this layering apporach. See also "How to overlay them" below.]
Some notes and
tips on property bars
• Can't see property bars?
Property bars for these elements (and many other items such as currently selected text, tables, and columns) are visible only when your cursor is inside one of them and the View > Toolbars > Property Bar option is enabled. See this page for more on what these items are and how they differ from regular toolbars.
• What's on property bars?
The number and type of items varies with the type of Property bar, which is "context-sensitive" and provides you with the most typically useful functions in the form of clickable buttons and drop lists.
☼ Once a header, footer or watermark is visible on the screen (see the next topics, "How to start them" or "How to change them...") and your cursor is inside that "substructure," it is worth exploring its Property bar to become familiar with some of the features related to that element.
For example, there are buttons to insert page numbers inside a header or footer; or set headers or footers to display on even and odd pages; or set the distance between headers and footers and the adjacent body text; or set a watermark's shading. (Example: See Footnote 5 for how to use a footer to "fix" the distance between body text and page numbers and the bottom edge of the page.)
Just pass your mouse cursor over the buttons to view a brief explanation of each button's purpose.
If you use page number codes inside a header or footer -
[Tip: There's a button to insert page numbers on the Header and Footer property bars — or just use the shortcut alternative, Ctrl+P]- you probably will want to turn normal page numbering OFF if it was previously turned ON in that document. Here's how:
• Go to the top of the document (i.e., before any Header/Footer codes) and then use Format > Page > Numbering > Position: <No page numbering>. This will override any normal Page numbering that was set in the document prior to that point.
• Simply find and delete the [Pg Num Pos] code in Reveal Codes that is responsible for normal page numbering. [Note: Codes can generally be searched: see this page.]
Otherwise, if you don't disable normal Page numbering you will get two page numbers on each page, one inside the header or footer and one in the page's text area.
Note that turning OFF normal Page numbering does not affect Secondary, Chapter, or Volume numbering. For more on page numbering see the links in the sidebar column on the left.
☼ Need to stop (or reset) page numbering in a header or footer on one or more specific pages?
What doesn't work:
Using either -
Format > Page > Numbering > Position:<No page numbering>or
Format > Page > Suppress > Page Numbering
- on that document page will not work to stop page numbering inside headers or footers from displaying on one ore more specific pages. Similarly you cannot reset the numbering from inside the header or footer on that page.
Those two Format > Page... menu choices control page numbering in the main text area — so you can stop (or reset) such numbering in the main body text by using either choices (and you probably will want to use the first one, as discussed in the previous section above). But any numbering set to display in the header or footer will continue to display in the header or footer area on subsequent pages regardless of those settings.
Recall from above that headers and footers merely display their contents on the page, including the current page number — which number results from a [Pg Num Disp] code whose value is taken from the program's internal page number information for that particular page.
But to stop (or reset) just those header/footer page numbers you must work around this "display only" issue.
What does work to stop (or reset) them on specific pages:
• To stop page numbering on specific pages you can simply create a new header or footer on the appropriate document page, of the same type (A or B) and with the same text as before (if desired), but without any page numbering codes. It will replace the existing header or footer from that page forward (more on this below).
Then you can re-establish page numbering on any following page (if desired) by creating a new header or footer that contains your original text and page numbering format codes. Typically you would use the same type (A or B) but you can use either one if the other one is not being used. (Copy and paste should help here.) See "How to edit, change, or replace them" below.
Side note: You can always suppress the header and/or footer on one or more pages as described below. But this is not as "surgical" since it removes the entire header/footer from view on the page(s) where you suppressed it.
• Re-setting header/footer page numbering (for both normal page numbering and numbering inside headers/footers) mid-way through a document is a little easier:
Put the cursor at the top of the relevant page's main body text area and insert a new page number code there with Format > Page > Numbering > Set Value. (See also the tip on creating separate numbering schemes below.)
Just remember that the new page number code might be moved to another page if you insert or delete material above it, so this might work best on the final draft.
☼ Setting up page numbering (e.g., "Page x" or "Page x of y") inside a header or footer — see Footnote 6 below.
☼ To reset page numbers to another value midway through a document when page numbering is used inside a header or footer — see Footnote 7 below.
☼ Headers and/or footers can be used simultaneously to create separate numbering schemes on the same pages, something the default numbering feature cannot do. — See Footnote 8 below for methods and examples.
Hide the code [...continued from "How to delay them to another page," above]:
Here's a tip to let you
"hide" a [Delay] code [and some other codes] so it is less likely to be
moved or deleted accidentally.
Side notes and cautions
¤ You can hide many other format
codes, not just [Delay] codes.
(For example, if you have [Header] and/or [Footer] codes that don't
need to be delayed but should be immunized from accidental movement or
deletion you can hide them without embedding them in a [Delay] code.) This is explained in a tip on the page
on setting default formatting for all new, blank documents here.
¤ However, you probably don't want to delay headers/footers/watermarks for every new blank document based on the default template! Such delays are more often used in custom templates or an individual document — which is assumed below.
¤ For the purposes of the 3-step example below — which deals with delaying a specific custom header/footer/watermark -- we'll just hide the [Delay] code involved with that particular type of structure.
¤ You should be sure to create the codes and structures you wish to hide in the document text area first -- i.e., not inside another code, as noted in the caution below Step 3.
For example, here's a post on WordPerfect Universe that demonstrates the general hide-the-code technique -- but hides both a [Header] code and its related [Delay] code so that the header appears on page 1 only. [See Footnote 9 for the transcripted steps.]
point here -- and in the example below -- is that both the [Delay] code
and the custom header/footer/watermark codes were created in the main
document, not inside the [Open Style] code referenced in step 2 below.
This caution applies to any format code that acts as a "container" for other things.
For example, headers/footers/watermarks can contain text, graphics or
other format codes; styles can contain other codes and even text; and
delay codes can contain all other these. If you try to create or edit
such a "nested" format code from inside another code (such as the initial [Open Style] code) the program can freeze or crash. [To edit these "nested container" items see Footnote 9 under "Cautions".)
this hide-the-code technique is very useful for many users, it can be
problematic if you have other users on the same machine where you were
the one who hid the code(s). Why? They might not understand why some
formatting appears in the document for which there is no apparent
format code responsible. This can be frustrating to them if they need
to modify the formatted text (e.g., the information in a hidden or
delayed header or footer).
¤ Be aware that since delay codes are actually a pair
of codes (see Step 1 below), this hide-a-code method will only
hide the first code and not the second code of the pair. Hence a user might still delete the second code while editing on
page 2 (or whatever the specified delay is), thereby deleting both
codes! If this is a possibility with (e.g.) a Header or Footer you wish to delay
to page 2, consider using the Suppress feature
on page 1 instead of delaying the appearance of the Header or Footer
until page 2. Then the
resulting [Suppress] code can cut and pasted into the [Open Style] code
[Header] code, as outlined in the steps below. Neither code is a paired
code, so they won't have any presence in the body text area once you
Tips and notes
• Just remember to look inside the initial Open Style style code if you need to revise or delete the [Delay] code (or other hidden code)! (To revise it see the cautions at the end of Footnote 9, which explains how you will need to temporarily relocate the hidden code so that it can be edited.)
You cannot use Find & Replace (or the macro equivalent, SearchString) to search inside [Delay] codes, [Style] codes, or text variables (a form of Style). These are limitations of the program, at least for recent versions of it. You will have to edit the [Delay] or [Style] code by double-clicking on the code in Reveal Codes to edit it.
• You can use more than one [Delay] code in the document's initial style.
• Caution: Do not try to create a [Delay] code for a Header, Footer, or Watermark directly inside the document's (or template's) initial style's Styles Editor by using the menu in the Styles Editor dialog, or the program may "hang" on you under some conditions. Instead, either cut the [Delay] code from the document and paste into the Style Editor as explained above, or copy an existing [Delay] code from another document and paste it into the Styles Editor.
• Macro writers: You can easily incorporate formatting codes inside a document's (or template's) initial style with a macro. See here for an example.
Inside the Header or Footer area [...continued from the example in "How to change or replace them", above]
Modifying the format of Headers, Footers, and Watermarks
• To change the font used in the current header, footer, or watermark, locate the cursor inside it and simply set a new font and/or font size from the property bar or from the Format > Font menu. You can also select some text first to apply a font to just the selection. You can also add new justification (even left-center-right mixed justification to a single line), or add bold, italics, color, or other text attributes. [If you want to set the font, font size, or other formatting to be the default for your headers or footers (or even just one of them), see Footnote 4.]
• To change the left and/or right margins in these substructures when the cursor is inside them, you can simply drag the left or right margin guidelines (be sure to enable the checkbox, "Drag to move guidelines" in View > Guidelines). Alternatively, when the cursor is inside them, click Format > Margins and specify the left and right margins.
Note that when you create a header or footer (Insert > Header/Footer) the Headers/Footers dialog box that appears has a checkbox option to "Align with document margins". If you enable (tick) the option the left and right margins for the new header (or footer) will line up with the left/right page margins at that location. However, if you change the left/right page margins further down in the document's text the header/footer margins at that location will not automatically change to align them. If you need them to align, just use the manual drag method in the previous paragraph. (Clearly, this probably is best done on the final draft.)
• If you have replaced the same header, footer, or watermark of the same type (A or B) one or more times in the document, then (by design) each replacement supersedes the previous substructure of that type. So, any font or margin change you make in one of them will not carry over to the others. Therefore, if you want to apply, say, a new font to all versions of several Header A substructures wherever they appear in the document, it is much easier to edit the HeaderA style using Format > Styles on the main WordPerfect menu. Your edits will be global: they will modify all HeaderA's in the current document, in one operation.
• To change the top and/or bottom margins in header/footer substructures, you must work from the main document screen (not from inside the header/footer substructure) and either [A] drag their horizontal page margin (dotted) guidelines up or down, or [B] specify a new top/bottom margin setting in the Format > Margins menu. For watermarks, the second method is the only way to set up new top and bottom margins.
Hence, to move a header (for example) upward you would have to move the top page margin upward a small amount. This adjusts the distance above the header -- i.e., the area outside the page margin, not the distance between the header and body text. The latter can be done from the property bar, which is discussed below. You might need to adjust both the horizontal page margin and the separation distance to achieve the effect you want.
Note that you cannot create or move a header or footer outside (some might say "into") the page margins (i.e., between the page margin and the physical edge of the page). You can, however, simulate this format (see here).
• The context-sensitive property bar contains features (buttons) that allow
- adjusting the header/footer's separation distance to body text;
- setting even/odd/every page placement;
- setting a watermark's shading etc.;
- quickly inserting a horizontal line.
Pass your cursor over these buttons to see their functions appear in a balloon tip.
• You can set a default header or footer separation distance (i.e., the distance between body text and the header/footer) for new documents by modifying the default template; see the Tips section at the end of the example above.
Setting formatting defaults for Headers, Footers, and Watermarks
Step 1. Once the template is open for editing (the filename at the top of the WP window should end in .WPT, not .WPD), you can create a temporary Footer B (Insert > Header/Footer > FooterB > Create) if it doesn't already exist.
Step 2. With the cursor inside Footer B, double-click the [Open Style: FooterB] code in Reveal Codes. This opens the Styles Editor for the Footer B style in the template.
Step 3. In the Contents pane of the Styles Editor, place the cursor after any other codes, then from the property bar in the Styles Editor choose Arial Narrow font, then 10 point; then click OK to dismiss the Editor.
Step 4. Click outside the Footer to return to the main document area. (If you didn't actually create a footer -- i.e., you inserted no text or codes in the footer itself -- no footer should appear on screen. That's okay: the Footer B style has been modified, which is what we are trying to do. It will be "upstream" from the footer text later, when you create a document from the template, and pass on its new formatting to that text.)
Step 5. Save your template. When you create new documents based on that template, and then create a new Footer B, it should automatically format all text in Arial Narrow 10-point.
Example of using a footer to "fix" the vertical distance between body text and the bottom edge of the page
Assumptions: You want a 1.0" vertical area between the bottom of all body text (including any footnotes) and the bottom edge of the page, and you want page numbers to appear 0.5" up from the bottom edge of the page. (For more tips on page numbering see the resource links in the left sidebar above.) [Screen shot of example]
Here's how to do it.
Step 1. At the top of the document, set the bottom page margin to 0.5" with Format > Margins. This vertical position is where the page numbers will appear.
Step 2. Click on Format > Page > Numbering and set the Position to "No Page Numbering". This turns off the display of standard (default) page numbering, which normally appears at the bottom page margin. [If it does not turn it off you might need to search in the document for a [Pg Num Pos] code, which is what sets the visible page number position, and delete it.]
Step 3. Create a Footer (either A or B; see "flavors" above) with Insert > Header/Footer (see "How to start them" above). With the cursor inside the footer, use the Header/Footer property bar button labeled "Header/Footer Distance" to set the distance between the body text (which includes any footnotes) and the footer's text and/or format codes. Set it to 0.5".
Step 4. While still inside the footer, insert page numbering with the "Page Numbering" button on the Header/Footer property bar. This inserts a [Pg Num Disp] code, which you can then center in the footer (e.g., select the code in Reveal Codes and use either the Justification button on the Selected Text property bar that appears, or use Format> Justification on the main menu). You can also add characters in the footer such as hyphens to bracket the page number.
¤ Note that this step is optional, unless there is nothing else in the footer, because headers/footers require something in them when you create them. If you have any other content in the footer (even just a space character) you could just use normal page numbering at the bottom of the page (Format > Page > Numbering > Position) by positioning the cursor in the body text area, such as the top of the document. (But see information above about using only one of the numbering methods, not both (unless you actually want duplicate numbers on each page!).
¤ An advantage of using numbering inside a footer is that you can add text, formatting, and other material such as a logo in the footer, and also position the page number in a custom location in the footer, not just at the bottom.]
Step 5. Click outside the footer to return to the main document.
☼ Assuming you want to prevent the text-to-footer distance from being changed by deliberately or accidentally click-dragging the footer's top guideline, you can disable the ability to drag guidelines with View > Guidelines. This would help "fix" the distance from the bottom of the body text (and footnotes, if any) to the bottom edge of the page. It also prevents page margins from being dragged with the mouse.
☼ You can, of course, use a similar method with headers to adjust the vertical distance to body text.
Using page numbering inside a header or footer ("Page x" or "Page x of y" )
[See also Footnote 8 about using headers/footers to display two separate sequences of numbering on the same pages.]
Step 1. First, turn normal page numbering off if it is on (see above). Then:
Step 2. Place the cursor inside the header or footer (click in it or use Insert > Header/Footer > Edit).
You can position the location for the page numbers with hard returns, tabs, justification, line centering, flush right, typesetting codes, etc.
[You can also create a text box (with or without a border) inside the header or footer to hold the page numbering (see next step). This is an easy way to "box" the numbers and/or drag them to a desired position.]
Step 3. While the cursor is in the header/footer, insert the Page Number at the desired location with either the Page Numbering button on the Header/Footer Property bar (choose Page Number), or with Format > Page > Insert Page Number.
Step 4. For "Page x of y" numbering: Continue by typing the word " of " in the header or footer; then use the button again and choose Total Pages.
Notes and tips
¤ Standard (i.e., program default) page numbering -- i.e., numbering applied outside headers or footers with Format > Page > Numbering -- has a "Page x of y" formatting choice, at least in modern versions of WordPerfect. But using this format inside a header or footer requires the steps above.
¤ Each button choice on the property bar inserts a format code (visible in Reveal Codes [View > Reveal Codes]) which does the work of displaying the numbers.
¤ The "total pages" number is automatically updated when you add or delete pages in the document (sometimes you have to scroll up or down a bit to refresh the pages and their numbers).
Customization (some examples)
• The "page" part (the "X" component) of the numbers can be changed to another value mid-way in the document. See the next footnote below.
• The "total pages" part (the "Y" component) of the numbers can also be changed to another value -- such as "Y-1" so as to include an extra non-numbered page after the last (numbered) page. Here's a tip by Joe Fox on WordPerfect Universe:
(1) Go to the last page and suppress page numbering -- or, if using the numbers in a header or footer, suppress or discontinue the header or footer on that page, or else replace it with the same header/footer without page numbering inside it. (See above for more on headers, footers, and watermarks.) Essentially this step removes page numbering from the "Y+1" page.
(2) Click on Format > Page > Numbering > Set Value. Reset that last page number's value to the total number of pages minus 1.
(3) In that Values dialog enable (click on) the radio button option to "Let number change as pages are added or deleted".
(4) Click OK.
The main advantage with this method is that prior numbering should be maintained even if you add or remove material above the last page.
• Use a cross-reference target in place of the "Y" component.
Here's a similar method to change the "total pages" value (though not automatically) with an old method (circa WP6?) that was used before the program began shipping with "Page X of Y" numbering.
Tip: Open Reveal Codes to see what codes are created by this method.
Example: Set the "total pages" number (inside a header or footer) so that any additional page that follows a desired "last page" is NOT included in the total page count.
First: Place the cursor on the last line of the desired "last page". Then -
(1) Mark a cross-reference Target there using Tools > Reference > Cross Reference (tab) and set the Reference Type to Page.
(2) Choose any name in the Select Target field and click the Mark Target button. This should insert a [Target] code in the document.
Then: With the cursor inside the header (or footer) -
(1) Type "Page " (i.e., the word followed by a space).
(2) Insert the code for the current page number (usually Ctrl+P; or use the page number button on the header/footer property bar).
(3) Type " of " (i.e., the word surrounded by spaces).
(4) Insert the cross reference to the target with the Mark button (NOT the Mark Target button) on that same Reference Tools dialog. This should insert a [Ref Pg] code in the header (or footer).
(1) Exit from the header or footer (click outside it) and generate the document with Tools > Reference > Generate. (Note: Un-checking "Build hyperlinks" in the small dialog that appears will remove the hyperlinks -- but also from any other hyperlink items such as a Table of Contents or an Index. But this might be useful with documents that are to be printed on paper.)
(2) You will need to either [a] suppress (or discontinue) the header or footer on any pages that follow that "last" page, or [b] replace the header/footer at that point with one that has no page numbering or has a different page numbering scheme (i.e., one without a "Y" component). (See above for more on headers, footers, and watermarks.) [Tip: See the next footnote below for a way to use separately numbered "Page X of Y" sections in a document.]
(3) Important: Be aware that if you insert or delete materials before (i.e., above) the [Target] code the page numbering might change, so you will need to re-generate the document with Tools > Reference > Generate -- the same as you would for a Table of Contents or an Index -- to refresh cross references.
Tip: See WordPerfect's (F1) Help, "Working with cross-references," or the Reference Center on the Help menu, for more information.
To reset page numbers to another value midway through a document when page numbering is used inside a header or footer
[For "Page X of Y" numbering this method applies to just the "page" part of the numbers (i.e., the "X" component). To change both the "page" part and the "total pages" part of "Page X of Y" numbering see the Notes and Tips section below.]
Assuming you have already inserted a page numbering code in a header or footer with the Page Numbering button on the Header/Footer Property bar (see above) or with Format > Page > Insert Page Number:
Exit from the header/footer and go to the very top of the specific document page (before all other format codes) where you wish to reset the page numbering sequence.
Use Format > Page > Numbering to first turn off standard page numbering in the Position field (i.e., choose "No Page Numbering").
Then use the Set Value button to specify a new page number value (e.g., "1"). This will insert a [Delay] code at that location. The new page numbering value will be picked up by the [Pg Num Disp] code in the "downstream" header/footer.
Notes and Tips
¤ See "Page numbering using both Roman and Arabic numerals" here for a similar method using Roman numeral page numbers for initial material ("front matter") or elsewhere in a document, and Arabic numbers for the rest of the document.
¤ If you want to skip header or footer numbering in a section of the document and then resume numbering in the same header/footer location on pages in a later section, you can simply create a new header or footer (of the same type, A or B) at the point where numbers should be absent. As noted above, a new header or footer of the same type will replace (i.e., discontinue and supersede) the previous one at that point in the document. [Note that since the new header or footer must contain something, you can simply add a space character in it when creating it.] Then create another new header or footer where numbering should resume and add numbering as explained above in this footnote (you can start the new numbering with a different value, if desired). Repeat as needed in the document, using un-numbered headers or footers as "spacers" between the numbered pages.
¤ [For "Page X of Y" numbering:] Assume you want to create separately numbered "Page X of Y" sections in a document -- e.g., a section numbered like "Page X of 8" (for physical pages 1-8) followed by a section numbered "Page X of 2" (for physical pages 9-10).
You can do this using cross-reference targets as the "Y" component of the numbered sections. (See the footnote above for the general method.)
Here's how (thanks to Noal Mellot on WordPerfect Universe here):
▸ At the top of the document (or before the first section to be numbered this way) use Format > Page > Numbering to first turn off standard page numbering in the Position field (i.e., choose "No Page Numbering").
▸ Go to the end of the first section of the document. Open the Reference Tools dialog with Tools > Reference > Cross-Reference and set a target there: Set the Reference Type to Page, give it a name in the Select Target field, and click Mark Target.
▸ Then go to the end of the second section of the document and set another target there: Give it a (different) name, set the Reference Type to Page, and click Mark Target.
▸ Create the header (or footer) at the top of the document (or where desired) [see above]. Define its placement to appear on every page going forward.
▸ In that header (or footer) type "Page " (i.e., the word followed by a space). Insert the Page Number code [usually Ctrl+P, or use the Page Numbering button on the property bar]. Type the word " of " and then insert a cross-reference to the end of the first section using the Mark button (NOT the Mark Target button) on the Reference Tools dialog. This inserts a temporary question mark ("?") in the header (or footer).
▸ Go to the top of the second section. Reset the page number there to "1" with Format > Page > Numbering > Set Value > "1".
▸ Then create another header (or footer) of the same type, A or B, so that it supersedes the first header (or footer) and also appears on every page going forward. Insert the same text and Page Number code in it the same way as in the first section, but insert the cross-reference to the end of the second section.
▸ Exit from the header (or footer). Generate the reference tools with Tools > Reference > Generate. Note: Un-checking "Build hyperlinks" in the small dialog that appears will remove the hyperlinks -- but also from any other hyperlink items such as a Table of Contents or an Index. But this might be useful with documents that are to be printed on paper.
Important: Be aware that if you insert or delete materials before (i.e., above) the [Target] code the page numbering might change, so you will need to re-generate the document with Tools > Reference > Generate -- the same as you would for a Table of Contents or an Index -- to refresh cross references.
☼ You can eliminate the hyperlink and blue underline from the generated "total pages" page number when you generate the reference tools by un-ticking the "Build hyperlinks" choice on the pop up Generate dialog (image). Of course, if you have other hyperlinks (e.g., a Table of Contents, Index, etc.) in the document then this will eliminate hyperlinks there as well. [Related tip: An option some users employ that will keep the links active: Remove just the blue [Color] and [Und] format codes from the Hypertext style. (Or you can change the Hypertext style to something other than blue underlines.) See more here.]
☼ See WordPerfect's (F1 key) Help, "Working with cross-references," or the Reference Center on the Help menu, for more information.
Headers and footers can be used simultaneously to create separate numbering schemes on the same pages -- something the default numbering feature cannot do.
An example, from a tip by Charles Rossiter on WordPerfect Universe (here):
[Problem:] "I need to have page numbers on the top and bottom and my pages [have] different number[ing]. I need the top to start with 1 through 660; and the bottom to start with 194 through the end."
[Solution:] "... Use Secondary Page numbers in the header and Primary [i.e., normal] Page numbers in the footer.
1. At the very top of the document, do Format > Page > Numbering. Set the Primary Page number to be 194. Set its Position to be "No Page Numbering" [to remove normal page numbering from the body text area].
2. Create your header [on page 1]. Click the [#1] button [on the Property bar] and choose Secondary Page Number. [Since it was not set to a different value it will start with "1".]
3. Create your footer [on page 1]. Click the [#1] button and choose Primary Page Number." [Since it was set to "194" it will begin numbering with that value.]
[Problem:] Suppose you want to use normal page numbering at the bottom of all pages in a long document, but also want to separately number the last 20 pages in a Header at the top of those pages, beginning with the number "1," so that the last 20 pages are numbered 1-20 at the top of the pages while the bottom of those pages have continuous numbering from the beginning of the document to the end.
[Solution:] Use normal page numbering [Format > Page > Numbering, etc.] at the bottom of all pages (or even inside a Footer, as Charles mentioned [see the method here]) and use Secondary numbers inside a new Header that starts on the 20th page from the end of the document.
Secondary numbers are a separate, sequential numbering feature that can be used anywhere, including in a Header or Footer.
Assuming all pages already have normal numbering at the bottom of each page*:
1. Open Reveal Codes. Create a new Header on the 20th page from the end of the document. Position the cursor inside the header where desired and click on the Page Numbering button (it has a #1 as the button icon) on the Header/Footer property bar that should be visible; then choose Secondary Number from the button drop list. This will insert the Secondary page number's display code: [Sec Pg Num Disp]. The number will display as the current page number, so....
2. Exit from the Header and set the Secondary page number's value to "1" at the very top of the body text area on the 20th page from the end of the document, before (i.e., to the left of) the new [Header] code with Format > Page > Numbering > Set Value (button) > Secondary (tab) > "Set secondary page number" = 1. Click OK until you are back in the document.
You should now see a new [Delay Codes] code on that page -- and the Secondary number in the new header should display "1" and increment on each subsequent page where that Header appears.
This is not particularly intuitive, so don't feel bad that you couldn't easily discover the method. Essentially you control (reset) the header's numbering value from the body text area, "upstream" from the header, and not from inside the header (for more, see above). (The same is true if you use a footer this way.)
Obviously this is best done on the final draft of the document. Otherwise any material inserted or deleted above that new header could affect the Secondary page numbering.
* If you want to use a footer to display normal Page numbering instead of displaying them in typical text areas (e.g., Bottom Center) you will want to turn normal Page numbering off (if it was on) above/before the point where the footer begins to prevent getting duplicate Page numbers on each page -- one from normal Page numbering and one from the footer's Page code on each page. See above for more on this specific topic.
[...continued from Footnote 1 above:]
A user on WordPerfect Universe (here) requested a method to display a header on page 1 of a document and automatically discontinue it on page 2 (if there is a page 2). He also wanted to make the format codes that produce the one-page [Delay] immune to being "pushed" downward in the document's text if material is added above the code.
Here's my reply, which includes hiding both the [Header] and the [Delay] code.
"1. Open a multi-page document (i.e., at least 2 pages). Open Reveal Codes (View > Reveal Codes).
2. If it does not already exist, create the header at the top of page 1 with Insert > Header/Footer. Choose the Header type (A or B) and then click Create. Add your required text, graphic, etc. Click in the main document area to exit from the header.
3. At the top of page 1 just after the new [Header] code, use Format > Page > Delay Codes. Set number of pages to "1" and click OK. This opens the "Define Delay Codes" editing window. Click the Header/Footer button. In the Headers/Footers dialog that appears, choose the Header type you used in step #2, and click Discontinue. A new code appears in Reveal Codes (e.g., [Header A End]). Click Close to exit from the "Define Delay Codes" editing window and return to the document. You should see a new [Delay] code there, next to the new [Header] code.
4. In Reveal Codes, select just the [Header][Delay] codes (Shift+arrow works well) and cut them to the clipboard with Ctrl+X.
5. Double-click on the initial [OpenStyle: DocumentStyle] code to edit it. Paste the codes there with Ctrl+V. Click OK to close the editor and return to the document.
The new header should appear on page 1 and not appear on page 2 and following pages (unless, of course, you create a new header of the same type further in the document).
This method probably is best done in a custom template so it will be available in all documents that are spawned by that template. If you do it in the current document, do not use the option in the DocumentStyle editor, "Use as default": You probably do not want the new customizations above to be used in the default template that spawns ALL new documents!
• Be especially aware that if you need to change (edit) the hidden header's material in the future you will need to -
 open the DocumentStyle code and select, cut, and paste the [Header] code from the DocumentStyle code into the main document [better: open a new blank document as a temporary work area] to edit it there,
 select/cut/paste the changed [Header] code back into the DocumentStyle where it came from.
If you try to edit the [Header] code while inside a DocumentStyle code (i.e., one code nested inside another code) it will likely cause the program to lock up and require you to use Windows Task Manager (Ctrl+Alt+Del). (Headers and delays are a form of style, and WordPerfect can't edit a style within another style.)
• Since a [Delay] code is made up of two codes (for more see here) -- a [Delay] code that tells WordPerfect what to do, and (on the specific delayed page) a [Delay Codes] code that tells it where to start doing it -- deleting the second one in the document's text area will prevent the execution of the [Delay] code instructions. (Using the method above, the first code will still be inside the initial DocumentStyle code since it is still "hidden".)
A quick and easy fix for this small problem is to double-click on the [Open Style: DocumentStyle] code, select and cut the [Delay] code with Ctrl+X, and then immediately paste it back in place with Ctrl+V. This should "refresh" the [Delay] code's instructions, restoring the [Delay Codes] code on page 2. Then click OK in the styles editor to exit back to the document."