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

Page updated May 2, 2019

WordPerfect Tips
Main tips page | Browse more tips

Page Numbering in WordPerfect


[1]  Menu choices in the information here refer to the <WordPerfect> menu (right-click on the top menu bar for a choice of menu). 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.]

[2]  Can't see page numbers in your document? Check under the View choice on the main menu: Page numbers will only be visible in Page or Two Pages view -- but not in Draft view.

Some basic information

•  Page Numbering in WordPerfect: The Basics, a brief posting by Jan Berinstein, administrator at WordPerfect Universe. Topics include -

(1) Use Format, Page, Numbering to specify the number's position, format, font, and beginning value.

Note: This method creates page numbers in one of 10 pre-defined locations at the top or bottom of the page. To create page numbering in custom locations or special formats, use headers or footers (method #2 below) for this purpose.

When the dialog opens you can set the position (location) on the page. The default is Bottom Center:
Select Page Numbering Format - Position

You can then set the page numbering format. A plain digit is the default (here, represented by 1):
Select Page Numbering Format - Page Format

You can also set a different font (face, size, color, appearance) for the numbers and a different starting number (Set Value button). The default font comes from the document's default font (which can be specified as described here). The default starting number is "1". The Custom Format button allows creating other numbering formats using your own text along with numbering codes. [For more on some of these topics see the "Numbering Pages..." Corel Tutorial below.]

(2) [Optional:] Use Insert, Header/Footer to create a header or footer — then use the property bar buttons to insert the page number code that displays the page number. Add any additional text, graphic line, etc. This method can give you more flexibility in page number formatting.

Note: You probably will want to specify No Page Numbering (see the Position list in first image above) when you use this header/footer method so that the program doesn't also add its own pre-defined numbering in the main text area of each page, thereby giving you duplicate page numbering. See also the other Tips below.

(3) Restarting page numbers and/or changing numbering format ... Just position the cursor at the top of the page (in the main text area) where you want to change the page number and click Format, Page, Numbering, Set Value. [In the Values dialog that appears you most likely will use the first radio button to keep the page number of the current page the same.]

(4) The current page number and cursor position appears at the very bottom of the WordPerfect window, in an area called the Application Bar (sometimes called the Status Bar). This bar has several settings and it should be visible by default -- but if is not, see Toolbars and Property Bars in the section here.

Tips: Double-clicking on the page number area on that bar brings up the Go To dialog. Right-click anywhere on that bar and click Settings to edit or change the items that appear on it.

•  Numbering Pages, Chapters, and Volumes in WordPerfect — a Corel WordPerfect Tutorial by Laura Acklen. Includes information about -

▸ Inserting and customizing Page numbers;
▸ Using Chapter and Volume numbers (which, though they do not increment automatically, can be used for things other than chapters and volumes); and
▸ Secondary numbers which automatically increment like normal Page numbers and provide a way to number all pages (or a range of pages) separately from normal page numbers. [See also examples here.]

[To use page numbering inside a header or footer see the related tips section below.

Some related tips

•  Headers and/or footers are often used to display page numbering, especially custom page numbering formats or locations.

Some information and examples on the Headers, Footers, and Watermarks page:

▸ General information and tips on using page numbering inside headers or footers
▸ Specific information on how to use page numbering inside a header or footer -- "Page x" or "Page x of y"
▸ Creating simultaneous, separate page numbering sequences using Secondary page numbers inside headers and footers

Some other tips below make use of headers or footers.

•  Page identification: Alternating even/odd page numbering using headers or footers (and using a third "header" or "footer") for page numbering in alternate page locations.

•  Page numbering in (some) books  using headers or footers to create a page number at the bottom of the first page of a chapter or section, with remaining page numbers at the top of subsequent pages.

•  Page numbering using both Roman and Arabic numerals — How to use Roman numeral page numbers for initial material ("front matter") or elsewhere in a document, and Arabic numbers for the rest of the document.

•  Using two footers simultaneously (one for page number, the other for separator line and filename, etc.) so that items in them do not overlap.

•  Page numbering outside the page margins — Simulating page numbering outside the document's normal top and bottom page margins using a header or footer.

•  How to create "Continued on Page x" footers where "x" is the number of the following page.

•  Mixing landscape and portrait pagesHow to maintain headers, footers, and page numbering at the top and bottom of all pages when you mix landscape orientation with portrait.

•  Mixing text justification (left-center-right) on the same line; e.g., text...current date...page number.

•  Merge tips for multi-page documents — Producing correct page numbering, footnote/endnote numbering, and line/paragraph spacing with multiple-page merge forms.

•  Consecutively numbered labels, tickets, cards, sheets, etc.

•  How to clear (i.e., remove) page numbering in a document to resolve page numbering issues -- Footnote 4 below mirrors a Corel support article explaining the use of Edit, Find and Replace to delete existing page numbering codes. It explains there are 7 candidates beginning with "Pg Num" -- plus 2 Delay codes that might also enable page numbering by virtue of having page numbering codes inside them.

Tip: These codes (and many others) can also be quickly deleted throughout the document using the free DelCodes.wcm macro in the Toolbox library here.

Caution: Delay codes are designed to hold specific formatting inside them until needed on specific pages. Hence they might contain page numbering codes (e.g., even WordPerfect often inserts them when it needs them). So rather than automatically delete them like you might do with other page numbering codes (enumerated in the Corel article below) with Find and Replace or with a macro like DelCodes.wcm, existing [Delay] codes are best examined first by manually opening them to edit them. (Double-click on the [Delay] code to edit it. For more information see the Delay codes page on this site.) If you find page numbering codes inside them, those codes can be deleted, leaving alone any other format codes inside the [Delay] code that you (or the program) might need to keep. (See Footnote 1.)

•  Getting the true (physical) page count —

Some page numbering schemes change page numbers midway in the document (e.g., Roman numerals for various "front matter" followed by page number "1" at the beginning of the main document so the total pages that can be displayed via a Total page number [code] might not reflect the actual number of printable pages in the document. You can get this count with File, Properties, Word Count (tab), "Pages". (Macro equivalent: Footnote 2).

•  Numbering a document using a macro — See Footnote 3.

•  Numbering the lines inside all WordPerfect columns (not just the first column) — Use the newspaper column format. [Screen shot of sample] See Footnote 5 below.

Forcing a page number

From WordPerfect X7's Help <F1>:

"By forcing a page number, you can insert a new page or make sure that a certain page in a document always has an odd or even page number. ... (1) Click on the page where you want to force a page number. (2) Click Format, Page, Force Page. (3) Enable [the appropriate option]."

Some related macros

1FORMAT - One-stop page and paragraph formatting

DYNAHEAD - 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

EMPTYPGS - Clean up empty pages (suppress numbering on blank pages, etc.)

SUPPRESS the appearance of page numbers (and some other items) on a specific page.

SUPDELAY - Automatically set up "second pages" with "page identifiers" using Suppress and Delay codes (via a macro).

Footnote 1
[...Continued from above...]
Delay codes are actually made up of two codes:

The first code (shown as [Delay] in Reveal Codes) tells WordPerfect what to do; the second code ([Delay Codes]) code appears on the page where WordPerfect should start doing it.

Double-click the first code of the pair
(i.e., [Delay]) to open the full-size Define Delay Codes window. [You can use Edit, Find and Replace, Match, Codes to search for the first code of each pair.] Make sure Reveal Codes is open so you can see what is inside the [Delay] code.

Page numbering codes (there can be up to 7 varieties) begin with "Pg Num" (e.g., [Pg Num Disp]). As noted above you can use a macro found on the Toolbox site (DelCodes.wcm) to quickly remove any or all of these codes which are not inside a Delay code. (Macros, like the Find and Replace feature on the Edit menu, cannot search inside Delay codes or Style codes. Hence if you wish to deal only with page numbering codes you will need to locate any [Delay] codes and look inside them.)

For more on Delay codes see here.

Footnote 2
[...Continued from above...]
Here is a simple macro to count the true (physical) pages in a document and display the count in a pop up message.

To copy this code into your WordPerfect program to create a working macro, see here.

// Macro begins
pExitSubstructures ()
Until(?RightChar="" and ?RightCode=0)
Messagebox(;;"Total physical pages in document: " + vPgs)

Procedure pExitSubstructures ()
// Exit from any header, footer, footnote, endnote,
// text box, graphic caption, etc.:
While (?Substructure)
    If ((vSubDoc=10) or (vSubDoc=11))    
        BoxEnd (Save!)
If (vBoxType=1 or vBoxType=3) BoxEnd (Save!) Endif
// Macro ends

Footnote 3
For macro writers -- continued from above]
Insert numbering codes in a document with a macro

Here's an 3-line example snippet of macro code that inserts a custom page numbering format and its number position, starting on the current page of a document (snippet demonstrated by Charles Cork on OfficeCommunity.com).

To copy this code into your WordPerfect program to create a working macro, see here.

vTitle := "Document 1, Page "
PageNumberFormat (Format: vTitle + "[Page #]") // (<- insert actual code here)
PageNumberPosition (Position: TopCenter!; Default: DontUseDefaultValues!)

Note that you must replace the text placeholder (in blue) between the quote marks with the actual binary code from the Codes button ("Other" tab) on the Macro Toolbar. [Alternatively you can use this command: PageNumberFormat (Format: vTitle + NToC(63776)).]

Footnote 4
[...Continued from above...] From a Corel Knowledge Base article here (current as of November 2017):
"How to clear Page Numbering in a document to resolve page numbering issues

Sometimes page numbering may not work out as may be expected in the document for various reasons. Whether there were codes copied from another source that caused a problem, or page numbering has been set more than once, this information needs to be cleared out in order that page numbering can be redone and fixed in the document.

This [article] will cover the steps to find and eliminate codes in the document that can impact page numbering. Once these codes have been completely removed you will then be able to set page numbering up as expected in the document.

To clear page numbering using the Find and Replace feature in WordPerfect®:

1. With your document open in the foreground on your screen Click on Edit -> Find and Replace

2. Set the option for replace with to by selecting that option from the dropdown list provided.

3. Delete any text or codes shown in the "Find" field

4. Click Match -> Codes...

5. In the codes list displayed single click to highlight the code you wish to search for. (A list of codes you need to search for individually will be provided bellow)[sic]

6. Click insert and close to insert that code into the Find field

7. Click the "Replace All" button

8. If any codes are found click OK to the message that informs you of this and click "Replace All"again to do a second check.

9. If prompted that no codes have been found "Do you want to continue searching at the beginning of the document?". Click YES

10. Repeat steps 3 through 9 for to find and remove each of the codes listed bellow.

The list of codes to search for individually are as follows:

[See also the Caution note regarding Delay codes above.]
•  Delay
•  DelayCodes
•  PgNumDec
•  PgNumDisp
•  PgNumFmt
•  PgNumInc
•  PgNumMeth
•  PgNumPos
•  PgNumSet

Once each of the codes have been removed using the above steps page numbering codes should now be removed from the document. At this point you will be able to begin re-adding in page numbering as needed."

Footnote 5
[...Continued from above...]
How to number the lines in all WordPerfect columns (not just the first column. [Screen shot of sample]

First - 

Format your text in newspaper columns with Format, Columns. (Set "Space between" as desired.)

Then -

•  In the first column, add line numbers with Format, Line, Numbering. (This brings up the Line Numbering dialog.)
•  Enable (tick) the checkbox "Turn line numbering on".
•  Set the Position to "Outside left margin".
•  Set the distance (in the adjacent measurement field), as desired.
•  Set the Font (button) to a smaller font, as desired.
•  Set any other options as desired.
•  Important: Enable (tick) the checkbox "Number all newspaper columns".
•  Click OK.