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

Page updated Sep 2, 2009

SWAPRECS - Swaps records in a (merge) data text file or data table file

Download SWAPRECS.ZIP (08/05/05; 23,867 bytes)

Compatible with WordPerfect 9 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

A macro that swaps every other record in a data text file or data table file. This produces a data file that will properly merge/print the reverse side of 2-column cards (e.g., "4-up" postcards or "10-up" business cards) with custom information (e.g., a person's name) on both sides. (See also DeleteRC, which you may want to play on data table files to "clean" them of empty rows before swapping records.)

Example:  When you merge print the front of 2-column cards, you'll get them in this order -

Record 1 Record 2
Record 3 Record 4
 ... etc.  

- but when you turn the card stock over, the cards need to be in the following order if you want to print the correct custom information on the back of the cards -

Record 2 Record 1
Record 4 Record 3
  ...etc. 

The macro works on your original data file, and creates a revised data file (which you should save separately) by swapping Record 2 for Record 1, etc. Using the revised data file you can merge/print the back side of the card stock in proper order so that each card addresses the same person on front and back.

Included in the ZIP file is a one-page document that gives instructions on how to create a merge form for the front and back of 2-column cards, then merge/print using the two data files -- original and revised. PLEASE READ IT.

NOTE: The macro works only on data files, not address book entries. But you can, of course, merge address book entries to a data table first.