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

Page updated Jan 15, 2010
WordPerfect Tips
Main tips page | Browse tips

Merge tips for multi-page documents

Related pages -

Setting up a mail merge (Corel Tutorial)

Merging multiple-page letters using letterhead paper for page 1 and plain paper for subsequent pages.

Merging multiple-page documents so that formatting is identical from record to record.

Page numbering, footnote/endnote numbering, and spacing in multi-page form documents.

See also Print your letterhead page from one printer tray, and second and subsequent pages from another tray for explicit information.

Want to use individual watermarks on several pages of a merge? Sometimes this can be problematic. See this thread on WordPerfect Universe for a solution.

Be sure to explicitly set your format and pagination codes at the top of the form document."

That way, when the second and subsequent documents in the merge queue are merged, any changes to formatting or pagination in the middle of the form document (or in a second form document) will be reset to their (user-defined) defaults for each document before it is merged with your data.

Notes

"Top of the form document" generally means the very top of the body text area in the form document, not inside the initial [Open Style: DocumentStyle] code. An exception is to use the [Open Style: DocumentStyle] code to reset page numbers to "1" as explained in the examples below, but this merely modifies the "top of the form document" rule.

If you have multiple form documents in your merge, you should explicitly set format and pagination codes at the top of each form document so that each merged document "reads" the format before it merges that item.

Examples

Two-tray merge printing

A user on a Corel newsgroup asked:

"I'm trying to merge print a two-page letter where page one is printed on letterhead pulled from one bin while page two is printed on plain paper pulled from a second bin."

Debra Earle (Corel C_Tech) replied with this tip:

". . . it seems to me that you simply need to put an explicit paper size/type at the top of the first page [of the merge form], rather than relying on the default document style, and then [a] delay code for the second page to change the page type."

The explicit paper size/type for Page 1 of the merge form letter can be entered by going to the top of the page, then clicking Format, Page, Page Setup and then (under the Size tab) choosing the page setup for your printer's letterhead tray.

The delay code can be entered on Page 1 with Format, Page, Delay Codes, 1, OK. Then in the Define Delayed Codes window that is now onscreen, use Format, Page, Page Setup to choose your second page's setup from the list. Click OK, then click Close to close the Define Delayed Codes window and return to the main merge form document.

[Page Top]

Resetting margins, headers, footers, etc., in merged documents

A user on the WordPerfect Universe asked:

"I am trying to merge a three-page document. The .frm document has a Header (with Subject:, From: and To, a Footer (with page number). The merging is on done on name, address, etc.

How do get the formatting of all three pages identical from record to record? That is to say, after each record the margins should be re-set, the headers and footers should be re-set and the page number should be re-set to 1."

Seth Katz answered:

"You need to include any 'resetting' formatting (page number, margins, etc.) at the top of the first page of the form, even if they are not needed on the first page, since they will be needed on subsequent instances of that page in the merged document. WP will normally delete any 'redundant' codes (e.g., the code setting the page number to [1] on the first page); but it will not do so if you have the merge toolbar displayed (i.e., if the document has been identified as a merge form).

If you try to do this in a regular document, the 'resetting' formatting will disappear. You can get around this by either including the 'resetting' formatting in a style and applying the style at the beginning of the document, or by setting dummy different formatting in the [initial] document style [by double-clicking the [Open Style] code in Reveal Codes, at the very top of the document], then changing the formatting to what you want at the top of the first page. Since these formatting codes are no longer redundant, they will not be automatically deleted."

[Page Top]

Producing correct page numbering, footnote/endnote numbering, and line/paragraph spacing with multiple-page merge forms

Note

For general information about -

Page numbering, see
"Page Numbering in WordPerfect".

Footnotes and endnotes, see "Footnotes and Endnotes: Setting or changing margins, numbers, font sizes, tabs and other formatting in WordPerfect notes".

Line spacing and paragraph spacing, see "How to double space text or add other custom line or paragraph spacing".

 

Method A: Modify the form document's initial style to force page numbering. note numbering, line spacing, etc.

A user on WordPerfect Universe asked:

My .frm [i.e., form document] has four (4) pages and are numbered. When I merge, I end up with the pages numbered as it if is one document -- which I realize it technically is, but I need it to be numbered ... 1,2,3,4 ... 1,2,3,4 ...

My answer:

"From the Corel support database (http://support.corel.com), Answer ID 203229 [which, though it applies to WordPerfect 9, should work in other versions]:

How to set Page Numbering in a Multiple Page Merge Document for WordPerfect® 9

Details

When merging information to a form file containing Page Numbering, a Page Numbering code is needed at the top of the first page in order to restart each copy of the merged document with page number one. The Page Number Set code cannot be placed on the first page of the form file because the first page is already page one and the program is designed to remove unnecessary (duplicate) codes.

Answer

The workaround is to force the page number, in the Document Initial Codes, to a value that is not equal to 1 and then reset it back to 1 on the first page of the form file. The following instructions will force each of the merged forms to start over with page one.

1. Place the insertion point at the top of the form file. Click on Format , Styles , Document Styles
2. Select Edit
3. Select Format, Page, Numbering, Set Value.
4. Change the 1 to a number higher than the number of pages in your form file. (If you have 3 pages in your form file, you will want to set the number to 4 or higher [such as 99]).

5. Select Apply, OK, OK, OK, Insert.
6. Now put the insertion point at the top of the first page of the form file. Click on Format , Page, Numbering , Set Value and set the value to 1.
7. Select Apply, OK, OK
8. Save the form file and perform merge."

If you are using numbering inside headers or footers, you'll probably want to remove the [Pg Num Pos] code in the Styles Editor during Step 5, leaving just the [Pg Num Set] code. (Or, when you are in the Page Numbering Styles Editor, change the 'Position:' drop list selection to 'No Page Numbering'; no [Pg Num Pos] code will be inserted.) Page numbering will then be accomplished by the page number code you will have inserted into the header or footer -- justified as needed -- with Format, Page, Insert Page Number (or just press <Ctrl+P> ). ...

... the 'Details' paragraph from the Corel article gives an explanation of why the workaround works. The program is designed to remove any extra [Pg Num Set] code that you would (normally) have inserted when trying to set that page number to '1' with Format, Page, Numbering, Set Value.

So the workaround first 'tricks' WP into thinking that the current page number is '10' (or whatever higher value you set it to in Step 4). Next, it 'sees' the new [Pg Num Set] code at the top of the body text area of the document (which has been set to a value of '1'), so it uses that value for the current page. The last code takes precedence in this case.

It makes sense if you think of WP as 'stream-oriented.' That is, most formatting starts at one location in the 'stream' of characters and codes and continues until replaced or discontinued by another, relevant code. (Hence the reason why Reveal Codes is so valuable in troubleshooting formatting in WP.)"

Footnote numbering, endnote numbering, line spacing and paragraph spacing:

At least one user reported that this "hide-a-code" trick works to reset footnote numbers to "1" at the top of a multi-page document. (Curiously it is not necessary with endnotes, which allow you to force a value of "1" at the top of a document.)

It should also work for Line Spacing (Format>Line>Spacing) and Paragraph Spacing (Format>Paragraph>Format), as well as for any feature where you can't (normally) set the value to "1" at the top of a document to force the merge to start with the minimum (number) value.

Method B: Use a simple embedded macro in the form file.

To force the first page's number to "1", here is a tip from Greg Turner at WordPerfect Universe. [Note that the first steps are optional, since they refer to setting up a "Page X of Y" page numbering format in the merge form.]

"[Optional:] 1. Go to the [top menu] and click on Format|Page|Numbering...
[Optional:] 2. Select the format "Page 1 of 1"
[Optional:] 3. Click on "Okay" button
4. With the merge form toolbar on,
a. Click on Insert Merge Code|More
b. Select EMBEDMACRO
c. Click on Insert
d. Within the
EMBEDMACRO() type in "PageNumber (Page:1)" to get: EMBEDMACRO(PageNumber (Page:1)).

If your form has pages that follow the numbered section, that you do not want numbered, you can use some combination of Suppress(PageNumbering!) and DelayCodes() within an EMBEDMACRO()."

[Page Top]