Chapter 14

MAILING LABELS AND ENVELOPES

Imagine writing and printing an envelope in just 10 seconds; or formatting the names and addresses for 3-up label stock in fifteen seconds. Such speedy efficiency is natural to WordPerfect if you first develop some simple macros for automating the chore. You will not only spend less time manually formatting the names and addresses, a tedious and thankless job at best, you will save label and envelope stock. Because WordPerfect controls the formatting for you, once you get the system down you can repeat the process over and over again with the same accurate results.

This chapter presents several macros for the preparation and printing of labels and envelopes. Although the macros are geared toward labels and envelopes for mailing purposes, you can use them whenever you need to prepare tags, cards, tickets, and other small printed matter. For example, you can just as easily use the macros to prepare labels for spice bottles, schools lockers, personalized bookmarks, you name it. If you can get the paper into the printer, WordPerfect can print on it.

 

PRINTING ONE-UP LABELS

Label stock is available in all shapes and sizes. A common label stock measures 3 1/2 by 15/16 inches. The individual labels are applied in one column on a continuous pin-fed sheet for use in daisywheel and dot matrix printers. A slight gap between each label on the sheets places the labels exactly one inch apart from one another.

You can use WordPerfect to print on these so-called one-up labels in a variety of ways. In one method, you print each label separately by entering the text from the keyboard. When you are done with one label, WordPerfect prints it, then readies itself for another label. You can also print a batch of labels using names and address text merged from a secondary file.


Direct Printing

WordPerfect 5.1 greatly simplifies the printing of labels and envelopes over previous versions of the program. But setting up a label format for printing one-up labels can be frustrating, because you need to carefully select commands, being wary that you access them in the proper order.

The following macro creates the one-up label format for you. Once the label form has been created, it remains as part of the definition for your printer. On subsequent uses of the macro, the label form is not re-created. Should you ever erase the label form, the macro will automatically re-generate it the next time you use it.

The macro, named 1UPLAB.WPM, is designed for interactive label printing. You type a name and address, then instruct the macro to print it. You can then write and print another, or quit. Obviously, you should have the label stock set up in your printer before using the macro. The 1UPLAB.WPM macro is designed so that it can be used while you are working on another document. WordPerfect uses Doc 2 as a temporary scratch pad for the label text. The macro will automatically stop if Doc 2 is not clear.


PRLABEL.WPM (provided on the Applications Disk)

1.  {ASSIGN}width~3~
    {ASSIGN}height~1~
2.  {DISPLAY OFF}
    {Switch}
    {IF}{SYSTEM}document~!=256~
        {Switch}
        {QUIT}
    {END IF}
3.  {LABEL}start~
    {Exit}nn
    {Format}PS
    {ON NOT FOUND}{GO}no_label~~
    {Search}1Up Labels{Enter}
    S{Exit}
4.  {DISPLAY ON}
    {CANCEL OFF}
    {LABEL}prompt~
    {STATUS PROMPT}Write (up to four lines); press Exit when    
finished~ {PAUSE KEY}{Exit}~
    {ON CANCEL}{GO}cancel~~
5.  {LABEL}done~
    {STATUS PROMPT}~
    {CHAR}key~{^]}1 P{^\}rint Now  {^]}2 Q{^\}uit  
    {^]}P{^\}{Left}~
    {CASE}{VARIABLE}key~~
       {Enter}~print~
       1~print~ P~print~ p~print~
       2~quit~  Q~quit~  q~quit~
       ~{GO}done~
    {LABEL}print~
    {DISPLAY OFF}
    {Print}F
    {WHILE}{SYSTEM}print~!=0~
        {WAIT}1~
    {END WHILE}
    {DISPLAY ON}
6.  {CHAR}key~{^\}Do another ({^]}Y{^\}es/{^]}N{^\}o)?  
    {^]}Y{^\}{Left}~
    {IF}"{VARIABLE}key~"="y"|"{VARIABLE}key~"="Y"|
    "{VARIABLE}key~"="{Enter}"~
        {DISPLAY OFF}
        {GO}start~
    {END IF}
    {IF}"{VARIABLE}key~"="n"|"{VARIABLE}key~"="N"~
        {DISPLAY OFF}
        {Exit}nn
        {Switch}
        {DISPLAY ON}
        {QUIT}
    {END IF}
7.  {LABEL}quit~
    {QUIT}
8.  {LABEL}no_label~
    {Enter}
    AO1Up Labels{Enter}
    SO
    {VARIABLE}width~"{Enter}
    {VARIABLE}height~"{Enter}
    AY{Enter}{Enter}S{Exit}
    {GO}prompt~
9.  {LABEL}cancel~
    {STATUS PROMPT}~
    {WHILE}{SYSTEM}menu~!=65535~
        {Exit}
    {END WHILE}
    {DISPLAY OFF}
    {DISPLAY ON}
    {QUIT}

 

Merge Printing

Another approach to printing on one-up label stock is to use a merge document. This method allows you to print several labels at once from an address file. You must prepare the address file ahead of time. A sample ADDRESS file is provided on the Applications Disk. You can use any file name, but you must edit the macro to indicate the document you wish to use for the secondary merge document.

The 1UPLAB.WPM merge macro uses the 1UPLABEL.MRG primary document (also provided on the Applications Disk). It's construction is simple. The label form is placed in Initial Codes (a requirement when merging labels), and the document itself contains just one field, {FIELD}1~. This design assumes the entire name and address constitute one field, as they do in the sample ADDRESS file. Edit the 1UPLABEL.MRG document if you use other fields in your secondary database files.


1UPLAB.WPM (provided on the Applications Disk)

1.  {IF}{SYSTEM}document~!=256~
    {BELL}
    {LABEL}warning~
    {CHAR}key~Warning!  {^\}The document is not empty.
    Proceed? ({^]}Y{^\}es/{^]}N{^\}o)  
    {^]}Y{^\}{Left}~
    {CASE}{VARIABLE}key~~
      {Enter}~go~
      Y~go~    y~go~
      N~stop~  n~stop~
      ~
    {GO}warning~
    {END IF}
2.  {LABEL}go~
    {Merge/Sort}M
    1uplabel.mrg{Enter}
    address{Enter}
    {CHAR}key~Labels are now ready to print  Press a key to    
	continue  ~
3.  {LABEL}stop~
    {DISPLAY OFF}
    {DISPLAY ON}

After the macro has finished, load the label stock and print it. You can also save the merged document, if desired.


About the Standard Printer Definition

The 1UPLABEL.MRG file is formatted for the Standard Printer definition. WordPerfect expects to find the STANDARD.PRS definition (which is the universal printer definition used by the program) on your disk. If it's not there, the macro will stop (there's no error handling included).

Before using the 1UPLABEL.WPM macro, you should reformat the document using your printer definition. Manually retrieve the 1UPLABEL.MRG document, select your own printer, and resave it. Now, the macro should run properly, and the labels it creates properly formatted for your printer. Some tweaking may be required to conform the formatting of the merge document with your particular printer. The WordPerfect manual provides details on using label forms, and how to edit them to suit your requirements and printer's needs.


Compensating for Differences In Printers

The label macros above start printing on the first line. Some printers don't allow this and need from 1/4-inch to as much of an inch of extra space before they can print the first line. If yours falls into the category, you'll need to adjust the label stock in the printer so that the first line corresponds with the top of a label. With some practice, you will learn how much extra space to give so that the labels are printed properly.

 

PRINTING THREE-UP LABELS

One-up labels require your printer to have an adjustable tractor or pin-feed mechanism. If you can't adjust the distance between the tractors, you will find it difficult to use the narrow one-up label stock. One alternative is to use three-up label stock -- three labels across a standard 8 1/2-inch paper backing (the actual width, adding the tractor holes, is 9 1/2 inches).

You may also use three-up labels because you have many labels to print. Three-up stock is generally less expensive than one-up labels, and is routinely available in pressure-sensitive gummed-backed and "lick-n-stick" Cheshire versions.

Three-up labels require some extra formatting on your part but they really aren't any more difficult to prepare than one-up labels. By changing the label form for the primary merge document used with 1UPLAB.WPM, detailed above, you can be creating three-up labels in no time.

The 3UPLAB.WPM macro, provided on the Applications Disk, is the same as 1UPLAB.WPM, except that it uses a form called 3UPLABEL.MRG (also included on the disk). And, as with 1UPLAB.WPM, this macro assumes you will be merging the names and addresses from a secondary merge file (initially called ADDRESS, but you can edit the name as desired).

IMPORTANT NOTE: The 3UPLABEL.MRG merge document is formatted for the Standard Printer definition, and is designed for use with dot matrix, daisywheel, and other line printers. If you're printing labels with a laser printer, such as the Hewlett Packard LaserJet, use the 3UPLASER.WPM macro, detailed below.

The 3UPLABEL.MRG label form automatically sets the size and orientation for a the typical sheet of three-up labels. You may wish to experiment with the margin settings to adjust the print for the particular label stock you use.

 

LASER LABEL PRINTING

WordPerfect can print labels on a laser printer as well as it can print labels on a dot matrix or daisywheel printer, but the primary merge document requirements are somewhat different. The following macro is functionally identical to 1UPLAB.WPM, except that it calls a label form called "3UPLASER.MRG." This form, provided on the Applications Disk, is defined for the Hewlett Packard LaserJet Series II, but you can readily adapt it to your own brand and model of laser printer.


3UPLASER.WPM (provided on the Applications Disk)

{IF}{SYSTEM}document~!=256~
{BELL}
{LABEL}warning~
{CHAR}key~Warning!  {^\}The document is not empty. 
Proceed? ({^]}Y{^\}es/{^]}N{^\}o)  {^]}Y{^\}{Left}~
{CASE}{VARIABLE}key~~
{Enter}~go~
Y~go~    y~go~
N~stop~  n~stop~
~{GO}warning~
{END IF}

{LABEL}go~
{DISPLAY OFF}
{Merge/Sort}M
3uplaser.mrg{Enter}
address{Enter}
{DISPLAY OFF}
{Home}{Home}{Up}
{DISPLAY ON}

{CHAR}key~Labels are now ready to print  Press a key to 
continue  ~

{LABEL}stop~ {DISPLAY OFF}
{DISPLAY ON}

 

SKIPPING LASER LABELS

You can stop and pick up anywhere when using continuous label stock on a dot matrix or daisywheel printer. Print five labels, stop and tear off the labels, then print more. Depending on the design of your printer, you little if any labels because you can manually adjust the position of the blank labels in the printer's platen.

Laser printers print an entire page at a time, making continuous form labels impossible, and printing of just a handful of labels impractical. The average full-sheet three-up label stock contains 30 labels (three across by 10 down). Print five labels, and that rest of the sheet is shot. While you could probably re-feed the partially-used sheet back through the printer, new labels will print over the backing.

The SKIP.WPM macro presented here provides a neat way to merge names and addresses from a database file (ADDRESS), and indicate where the label printing is to start. The macro assumes you are using standard three-up full-size laser printer labels, containing 30 labels.

The merge portion of the macro is the same as 3UPLASER.WPM. After the names and addresses have been merged, the macro displays a grid of 30 boxes; each box represents a label. Use the up, down, right, and left cursor keys to move the highlight to the first available label on the sheet. WordPerfect prints labels across then down, so labels are used up by rows first.

When you have selected the first available label you want to use, press [Enter]. The macro computes the label number based on the box you selected, and adds the proper number of blank {END RECORD} codes to the beginning of the document. You can now print the labels.

As with the 3UPLASER.WPM macro detailed above, SKIP.WPM uses the 3UPLASER.MRG primary merge document and the dummy ADDRESS secondary file (both the primary and second secondary files are provided on the Applications Disk). The 3UPLASER.MRG document is pre-formatted for a Hewlett Packard LaserJet Series II. Redefine the printer if you use a different make or model.


SKIP.WPM (provided on the Applications Disk)

1.  {IF}{SYSTEM}document~!=256~ 
	{BELL}
        {LABEL}warning~
        {CHAR}key~Warning!  {^\}The document is not empty.  
        Proceed? ({^]}Y{^\}es/{^]}N{^\}o)  {^]}Y{^\}{Left}~
        {CASE}{VARIABLE}key~~
           {Enter}~go~
           Y~go~    y~go~
           N~stop~  n~stop~
           ~
           {GO}warning~
    {END IF}

    {LABEL}go~
    {DISPLAY OFF}
    {Merge/Sort}M
    3uplaser.mrg{Enter}
    address{Enter}
    {Home}{Home}{Up}
    {DISPLAY ON}
    {CALL}skip_rec~
    {CHAR}key~Labels are now ready to print  Press a key to 
    continue  ~

    {LABEL}stop~
    {DISPLAY OFF}
    {DISPLAY ON}
    {QUIT}
2.  {LABEL}skip_rec~ {Home}{Home}{Up}
    {ON CANCEL}{GO}cancel~~
3.  {ASSIGN}col~2~
    {ASSIGN}row~1~
    {STATUS PROMPT}{Home}
      {Enter}     
                     1 {Enter}
       {Enter}
                    2 {Enter}
       {Enter}
                    3 {Enter}
       {Enter}
                    4 {Enter}
       {Enter}
                    5 {Enter}
       {Enter}
                    6 {Enter}
       {Enter}
                    7 {Enter}
       {Enter}
                    8 {Enter}
       {Enter}
                    9 {Enter}
       {Enter}
                    10{Enter}
       {Enter}
       1     2     3      ~
4.  {CALL}write~
5.  {LABEL}key~
    {ASSIGN}key~~
    {LABEL}loop~
    {LOOK}key~
    {CASE}{VARIABLE}key~~
      {Right}~ right~
      {Left}~  left~
      {Up}~    up~
      {Down}~  down~
      {Enter}~ calc~
      ~{GO}loop~
6.  {LABEL}right~
    {IF}{VARIABLE}col~<14~
        {CALL}erase~
        {ASSIGN}col~{VARIABLE}col~+6~
        {CALL}write~
    {END IF}
    {GO}key~

    {LABEL}left~
    {IF}{VARIABLE}col~>2~
        {CALL}erase~
        {ASSIGN}col~{VARIABLE}col~-6~
        {CALL}write~
    {END IF}
    {GO}key~

    {LABEL}up~
    {IF}{VARIABLE}row~>2~
        {CALL}erase~
        {ASSIGN}row~{VARIABLE}row~-2~
        {CALL}write~
    {END IF}
    {GO}key~

    {LABEL}down~
    {IF}{VARIABLE}row~<18~ 
        {CALL}erase~
        {ASSIGN}row~{VARIABLE}row~+2~
        {CALL}write~
    {END IF}
    {GO}key~

    {LABEL}calc~
    {ASSIGN}row~({VARIABLE}row~+1)/2~
    {ASSIGN}col~({VARIABLE}col~+4)/6~
    {IF}{VARIABLE}col~=1~
        {ASSIGN}label~{VARIABLE}row~*3-2~
        {GO}add_rec~
    {END IF}
    {IF}{VARIABLE}col~=2~
        {ASSIGN}label~{VARIABLE}row~*3-1~
        {GO}add_rec~
    {END IF}
    {IF}{VARIABLE}col~=3~
        {ASSIGN}label~{VARIABLE}row~*3~
        {GO}add_rec~
    {END IF}
7.  {LABEL}add_rec~
    {DISPLAY OFF}
    {STATUS PROMPT}~
    {ASSIGN}label~{VARIABLE}label~-1~
    {FOR}record~1~{VARIABLE}label~~1~
        {Merge Codes}E
    {END FOR}
    {DISPLAY ON}
    {RETURN}
8.  {LABEL}erase~
    {ASSIGN}c~{NTOK}{VARIABLE}col~~~
    {ASSIGN}r~{NTOK}{VARIABLE}row~~~
    {PROMPT}{^P}
    {VARIABLE}c~
    {VARIABLE}r~  ~
    {RETURN}
9.  {LABEL}write~
    {ASSIGN}c~{NTOK}{VARIABLE}col~~~
    {ASSIGN}r~{NTOK}{VARIABLE}row~~~
    {PROMPT}{^P}
    {VARIABLE}c~
    {VARIABLE}r~~
    {PROMPT}{^P}~
    {RETURN}
10. {LABEL}cancel~
    {DISPLAY OFF}
    {STATUS PROMPT}~
    {DISPLAY ON}
    {QUIT}

PRINTING ENVELOPES

Printers equipped with carriages 10 inches or wider, as well as most laser printers with a cut sheet bypass, can be used to print directly on #9 or #10 business envelopes. Just like printing on labels, using envelopes with your printer requires you to reset formats and carefully monitor where the name and address text is going. A macro takes the guesswork out of envelope printing.

The ENVELOPE.WPM macro does not use any type of pre-formatted template document. It creates the format and even return address automatically (omit the return address if you are using pre-printed envelopes). The macro makes one envelope at a time from data you enter manually from the keyboard. The macro creates the envelope form as needed, and is designed for dot matrix and daisywheel printers. You can, however, modify the envelope form instructions if you're using a laser printer.

The ENVELOPE.WPM macro is effectively the same as the PRLABEL.WPM macro, detailed earlier in this chapter, so a step-by-step explanation won't be provided. As with PRLABEL.WPM, the ENVELOPE.WPM macro is designed for printing envelopes one at a time, from direct keyboard entry. Note that the ENVELOPE.WPM macro sets up a standard envelope form (9.5" by 4"), rather than a custom-named label form. You can, of course, edit the macro to produce any size or shape envelope you desire.


ENVELOPE.WPM (provided on the Applications Disk)

{Switch}
{IF}{SYSTEM}document~!=256~
{Switch}
{QUIT}
{END IF}

{LABEL}start~
{DISPLAY OFF}
{Exit}nn
{Format}PS
{ON NOT FOUND}{GO}no_env~~
{Search}Envelope{Enter}
S{Exit}

{DISPLAY ON}
{CANCEL OFF}
{LABEL}prompt~
{STATUS PROMPT}Write envelope address; press Exit when finished~
{PAUSE KEY}{Exit}~
{ON CANCEL}{GO}cancel~~ 
{LABEL}done~
{STATUS PROMPT}~
{CHAR}key~{^]}1 P{^\}rint Now  {^]}2 Q{^\}uit  
{^]}P{^\}{Left}~
{CASE}{VARIABLE}key~~
{Enter}~print~
1~print~ P~print~ p~print~
2~quit~  Q~quit~  q~quit~
~
{GO}done~

{LABEL}print~
{DISPLAY OFF}
{Print}F
{WHILE}{SYSTEM}print~!=0~
{WAIT}1~
{END WHILE}
{DISPLAY ON}

{CHAR}key~{^\}Do another ({^]}Y{^\}es/{^]}N{^\}o)?  
{^]}Y{^\}{Left}~
{IF}"{VARIABLE}key~"="y"|"{VARIABLE}key~"="Y"|
"{VARIABLE}key~"="{Enter}"~
{DISPLAY OFF}
{GO}start~ {END IF}

{IF}"{VARIABLE}key~"="n"|"{VARIABLE}key~"="N"~
{DISPLAY OFF}
{Exit}nn
{Switch}
{DISPLAY ON}
{QUIT}
{END IF}

{LABEL}quit~
{QUIT}

{LABEL}no_env~
{Enter}
AESE
AYM
3.75"{Enter}{Enter}
2.0"{Enter}{Enter}
{Enter}{Exit}
S{Exit}
{GO}prompt~

{LABEL}cancel~
{STATUS PROMPT}~
{WHILE}{SYSTEM}menu~!=65535~ {Exit}
{END WHILE}
{DISPLAY OFF}
{DISPLAY ON}
{QUIT}


Using Fonts

If you'd like to dress up your envelopes, embed font size and attribute codes within the macro. For example, to make the return address bold and large, press these keys before and after the return address block:

Key Sequence What it Does
1. [Ctrl]-[F8] Selects Font menu.
2. 1 Chooses Size option.
3. 5 Selects Large font size.
4. [Ctrl]-[F8] Reselects Font menu.
5. 2 Chooses Appearance option.
6. 1 Selects Bold.

You can change the font size and style for the address block by repeating the above steps. Place the "on" codes immediately after the "prompt" label. You don't need to turn them off because they will be forgotten when you leave the macro and erased if you choose do print another envelope.

 

ADDING GRAPHICS TO LABELS AND ENVELOPES

Even if you're not using pre-printed envelopes, you an still add a company logo or design by taking advantage of WordPerfect's graphics feature. The graphic image is, sizes, rotated, edited, and cropped as needed, and stored in an envelope template. You recall the template using a macro, then enter the addressee information. The same basic approach can be used to create labels, cards, tags, and tickets with embedded graphics. Change the paper size and make trial printouts until you position the graphic and text the way you want.

The ENVGRAPH.TMP document is provided on the Applications Disk; edit it as required, using the text and graphics or your choice. Once you're done editing, select your printer from the Select Printer menu (under the Print key).


ENVGRAPH.WPM (provided on the Applications Disk)

1.  {LABEL}start~
    {DISPLAY OFF}
    {Retrieve}envgraph.tmp{Enter}
    {Home}{Home}{Down}
2.  {DISPLAY ON}
    {PROMPT}Enter name and address; press Exit when finished  ~
3.  {LABEL}wait_exit~ {ASSIGN}1~~
    {LABEL}loop~
    {VAR 1}
    {LOOK}1~
    {IF}"{VAR 1}"="{Exit}"~
       {GO}finished~
    {ELSE}
       {GO}loop~
    {END IF}
4.  {LABEL}finished~
    {Print}F
    {Print}C

 

CAPTURING NAME AND ADDRESS

You've just written a letter and printed it out. Now to address the envelope or mailing label. If the name and address aren't already in a database file, you'll have to re-type them to make an envelope or label. Or you can use the name/address capturing macro presented here. This macro allows you to quickly and effortlessly block a name and address within a letter, and append it to a secondary database file.

The macro, called CAPADD.WPM and included on the Applications Disk, appends the names and addresses to a sample customer file named ADDRESS. Edit the macro if you a database file with a different name.

To use the macro, place the cursor at the beginning or end of the name and address. Start the macro, and following the on-screen prompt, place the cursor at the other end of the name and address. Press [Enter] when you are done, and the macro takes care of appending the text to the ADDRESS file.

The macro also adds {END FIELD} and {END RECORD} merge codes with each name and address it appends. These codes allow you to use the captured text to create merged mailing labels. The format is compatible with the merge label printing macros presented earlier in this chapter.


CAPADD.WPM (provided on the Applications Disk)

1.  {ON CANCEL}{GO}cancel~~
2.  {Block}
    {STATUS PROMPT}Move cursor to end of address; Enter when done~
    {ASSIGN}key~~
    {LABEL}loop~
    {VARIABLE}key~
    {LOOK}key~
    {IF}"{VARIABLE}key~"="{Enter}"~
        {DISPLAY OFF}
        {Block Append}address{Enter} 
3.      {End Field}
        {Merge Codes}E
        {Block}
        {Left}{Left}{Left}{Left}{Left}
        {Block Append}address{Enter}
        {Del}{Del}{Del}{Del}
4.      {STATUS PROMPT}~
        {QUIT}
        {GO}finish~
   {ELSE}
        {GO}loop~
   {END IF}
5.  {LABEL}cancel~
    {IF}{STATE}&128~
        {Block}
    {END IF}
    {STATUS PROMPT}~
    {QUIT}

---

 Top Contents

WordPerfect 5.1 Macros and Templates
Electronic Edition
Copyright 1990, 1997, Gordon McComb.  All Rights Reserved.
First published by Bantam Electronic Publishing, 1990.
http://www.gmccomb.com/