Contents of the MLPRINT.DOC file
MLPRINT.COM (Version 1.) Copyright (c) 1992 Jay Munro
First Published in PC Magazine December 8, 1992 (Utilities)
MLPRINT takes the ASCII text output of your name and address database
and prints it in a format approved by the U.S. Postal Service on standard
LaserJet labels and envelopes, complete with return addresses. MLPRINT
can also print standard PostNet bar codes for faster, and more economical,
routing of your mail.
HP LaserJet--compatible printer escape codes are built into MLPRINT.
Quick setup screens let you select among ten label and five envelope sizes.
Envelopes can include a return address of up to 6 lines of 40 characters,
and you can set up either for LaserJets that center-feed or for those that
right-feed envelopes. The regular paper tray or manual feed can be used
alternatively for label sheets or envelopes.
For either labels or envelopes MLPRINT will create the optional Post
net bar codes from 5-digit (normal), 9-digit (ZIP+4), or 11-digit
(ZIP+4 plus delivery-point information) ZIP codes. The output from MLPRINT
can be fed directly to the printer or redirected to a specifiable filename
for later printing.
If you modify the source code (to include a different label format or
to change the default setup, for example) you'll need Version 6.x of the
Microsoft Micro Assembler in order to recompile the program.
SETTING UP FOR MLPRINT
MLPRINT is only a formatting and printing utility, so before sending a
mailing list file to MLPRINT you should use your database program to pick
out the names to use and to arrange their address fields in the proper
sequence. MLPRINT will do its most efficient and fastest processing on
a file that matches the standard format specified by the USPS.
MLPRINT accepts ASCII files in which each line corresponds to a line
to be printed on the label. Each line should be terminated by a carriage
return and line-feed, and there must be one or more blank lines between
each address record. MLPRINT uses a blank line to indicate the end of
the address record, so you must make sure the address records do not
insert blank lines in place of missing fields when you set up the file
for MLPRINT. This can happen, for example, if your database is set up
with multiple street lines to cover apartment numbers or mail stops.
To output an ASCII file that will be readable by MLPRINT, simply give
your database a Print To Disk command. If your database or mailing list
won't allow you to print to a file, it may give you the option of
exporting to a file. On an export, you should be able to select the
standard format. As a last resort, you can use a utility to capture the
printer output from the database and send that to a file. PRN2FILE will
do just fine. You can download this program as PRN2FI.COM from the
Utilities/Tips Forum on PC MagNet.
The Postal Service-approved address format is designed for efficient
routing by OCR scanners, not for making a good initial impression on
human recipients. For the sake of accurate scanner readings all letters
are uppercased, and the only punctuation permitted is the hyphen in the
ZIP+4 code at the end of the address. If the mailing address entries
in your database file are kept in more conventional form, MLPRINT will
convert to uppercase and replace the offending punctuation marks with
spaces. Thus, for example, MLPRINT will transform
St.Paul, MN 46111
ST PAUL MN 46111
The order in which the address fields are arranged is important.
Starting from the bottom, the last line should contain the post office
(city), state, and ZIP code. The spacing between the state and the
ZIP code should be approximately one space with a monospaced font and
between one and five em spaces (the width of the m character) if a
proportional font is used. Since MLPRINT uses the standard laser printer
monospace Courier font, one space is sufficient.
Both for MLPRINT and for the Postal Service, the ZIP code must be
the very last item in the address block; MLPRINT won't build a bar code
unless it is. If for some reason the city or town is too long to fit,
the ZIP code can be put on the last line by itself.
Immediately above the city, state, and ZIP line is the delivery
address line, which contains the house number and street name (or box
number). When the house or box number is incorporated within a Postnet
bar code, the post office can directly route the letter closer to its
actual destinationsometimes even to the actual floor or office.
In interpreting the delivery address line, MLPRINT follows the same
rules as does the post office scanner. After reading the delivery line
from left to right, it examines the first block of characters up to the
first space. If this block contains numbers, MLPRINT appends the last
two contiguous digits (the delivery-point digits) to the Postnet bar code.
If the scan does not produce a number at all, or if it finds that it
contains nonnumeric characters (such as 125B, 32 1/2 Main Street, or
simply Maple Lane), the block is rejected and a 99 is appended to the
Postnet code instead. The 99 signals the post office to look at the
address more closely to determine the delivery point.
In setting up the fields in your mailing list database remember
that the delivery address line--the line immediately above the city,
state, and ZIP line--is the address to which the letter will go. If
your customer list has names with two addresses (one a box number and
another a street address for UPS or Federal Express deliveries, for
example) be sure to put the correct one on the delivery line, since
the other one will be ignored.
Lines above the delivery address are not considered by MLPRINT,
but the post office prefers them in the order shown below.
Information/attention-------------- ATTN JOHN Q PUBLIC VP OF SALES
Name of recipient------------------ ZIP COMPUTER INC
Delivery address------------------- 1234 FIFTH AVENUE SUITE 1
Post office (city),state,---------- ANYTOWN IN 46001-1122
and ZIP code
Omitted from the example above is an optional top line, called the
non-address data line. The non-address data line can be used to hold
customer-specific information such as the expiration date of a magazine
or the tracking code for a particular advertisement.
Once your mailing list file is ready, setting up and using the
MLPRINT utility is easy. Put the MLPRINT.COM executable either in a
directory listed in your PATH statement or in the directory containing
the text file created by your database. The second method lets you later
specify the text file without typing in a long pathname. From the DOS
prompt,enter the following:
and the program's main screen will come up.
The screen obviates the need to remember a string of command-line
parameters for determining how and what is to be printed. All infor-
mation is entered by typing a response and pressing Enter. By pressing
the Up Arrow keys you can return to a previous field; press the Down
Arrow key or Enter if you want to skip forward. Your options, briefly,
- Mailing List File: You can specify up to 50 characters for the
path and filename of the mailing list text
file created by your database. If you are
running MLPRINT from the same directory as
this file, just enter the filename and extension.
-Redirect to File?: If you hit Y rather than accept the default N
answer to this question, MLPRINT will write
the printer output to the filename you specify
as the destination file. That file can then
be printed later by copying it to the printer
using the command:
COPY /b destfile LPT1:
The /b specifies a binary file and is needed to
keep the printer control codes intact. Redirecting
to a file is desirable if you are printing on a
network and do not have direct control over the
-Destination File: This field is used if you answered yes to the
previous question. Again, you may specify up
to 50 characters of path and filename. The
field is ignored if redirection is not being used.
-Printer Port: MLPRINT can print to LPT1 or LPT2. If your laser
printer is connected to the serial port, use the
DOS MODE command to redirect. The normal mode
command for redirecting LPT1 to COM1 is this:
Of course if your printer is on COM2, substitute
that for COM1.
-Postnet Codes? Y/N: If it's appropriate for your mailing to use
Postnet bar codes, you would override the
default N and answer yes to this question.
MLPRINT will use the laser printer's graphic
resources to create a Postnet bar code, which
will be printed as the top line of the address
The Postnet bar code is the little strip of
vertical tall and short bars you see on most
pieces of business mail. It is composed of sets
of 5 lines, each set representing one digit.
The standard Postnet bar code is based on the
ZIP code in the address, so a 5-digit ZIP code
requires a bar code of 25 lines. A 9-digit ZIP+4
code produces a 45-line bar code. MLPRINT also
supports the Advanced Barcode, or ABC, which
adds 2 more digits (10 lines). These are derived
from the last 2 digits in the street address
or box number of the delivery address line.
Added to the bar codes generated by the 5-, 9-,
or 11-digit ZIP codes are a terminating correction
digit and one tall framing bar at each end.
(A correction digit is used by bar code scanners
to reconstruct a missing digit. So if, for
example, one of the digits in the bar code was
smudged, the scanner can determine the missing
digit using the corrections digit and the digits
that it can read.) Thus, for a fully outfitted
address with a street number and a ZIP+4, the
total number of bars is 62.
One warning about using bar codes on noncertified
address lists should be given. If the ZIP+4 is
incorrect, using the bar code can cause the letter
to be routed automatically to the wrong location,
which can add several days to the delivery time.
If in doubt, then it's better not to bother using
the bar codes. The post office OCR equipment will
read the address and print its own bar code.
Note that MLPRINT will not print a Postnet bar
code if you accidentally slip in an international
address or one without a ZIP code, or if the
address block is not in the correct format.
-Use Delivery Point (Y/N):
MLPRINT gives you the option of excluding the
delivery point value for ZIP+4 bar codes. Although
MLPRINT normally attempts to create a delivery
point code for 9-digit ZIPs if you have specified
yes to the previous question on using Postnet
codes, you may prefer not to use these additional
digits. One reason not to is if you are using
3-up labels: a 9-digit plus delivery point bar
code is wider than a 2.5-inch label.
-Manual Feed (Y/N): Choosing yes for manual feed causes MLPRINT to
send the LaserJet codes that require you to
manually feed sheets rather than rely on the
regular paper bin. This choice can be used for
both labels and envelopes.
-abels / nvelopes:
Hit an L for labels or an E for envelopes.
Depending on the answer, MLPRINT will display
an appropriate dialog box for further information
as described below.
The Label screen presents you with a list of Avery and Hewlett-Packard
part numbers and dimensions for the majority of popular configurations.
Labels intended for a sheet-fed dot matrix printer may be cheaper, but
they may not hold to their backing under the heat of a laser printer.
Avery and HP both market high-quality labels designed specifically for
laser printers. Trying to save a few cents on labels could wind up
costing you a bundle in printer repairs.
MLPRINT does not test the length of the lines in your addresses.
Although this is probably of little concern when printing envelopes, if
you're using labels you must be sure they are wide enough for all your
MLPRINT uses the standard 10-pitch (12-point) monospace Courier font,
which prints 10 characters per inch horizontally and 6 lines per inch
vertically. That makes it easy to determine the size of labels to use.
If address fields are set for 40 characters, you should use 4-inch-
wide labels; if you only have 25 characters, you can use 2.5-inch-wide
labels. On this basis you know that a 1- by 4-inch label will hold 6
lines of 40 characters.
Remember to allocate a line for a bar code if you plan to have
MLPRINT add one, however. MLPRINT puts the Postnet bar code on the first
line of the label and then prints the address. For a personal holiday
card list, the six lines of a 1-inch label will undoubtedly be more than
ample, but on a business mailing you may need to use a larger label.
The Up and Down Arrow keys move the screen highlight among the
various label choices MLPRINT supports. When you hit Enter to confirm
your selection, MLPRINT sets itself up for the size, spacing, and number
of labels per sheet. When using multicolumn labels, MLPRINT works from
left to right, one row at a time.
If you are not sure you have selected the correct label format, put
a regular piece of paper into your laser printer and press F2 to print a
full test sheet. Then simply lay the test sheet atop a sheet of labels
and hold them up to a light. This will confirm whether the labels line
up with the test prints or not.
Once you've determined that everything is properly set up, you print
your labels by pressing F10.
MLPrint's Envelope screen also provides a number of setup options.
The first is whether you wish to print your return address. The default
N presumes that you will normally use envelopes with a preprinted return
address. Next you must indicate whether your laser printer feeds envelopes
from the center or from the right side: On a LaserJet III, single-fed
envelopes are centered; on a LaserJet IIIP, however, they are flush right.
In either case, envelopes are fed with the flap on the left.
Your third choice is among the various envelope sizes MLPRINT supports.
Note that if you decide to print a Postnet bar code, MLPRINT will place it
above the regular address block to allow you more flexibility in choosing
envelopes. (The Postal Service permits the alternative of printing the bar
code in the ``Postnet Clear Zone,'' an area of 4 1/2inches from the right
edge and 5/8 inch up from the bottom edge of the envelope.)
Finally, if you have elected to print a return address, you will be
prompted to type it into the field provided. Up to 6 lines of 40 characters
each can be entered in this block.
After checking that you've specified the right parameters and that
your printer is on and full of labels or envelopes, press F10 to start
printing. Any printer or source file errors will be displayed on the
screen. You're likely to get one of two error messages eventually
depending on your hardware: ``Out of Paper''or ``Printer Not Responding.''
When of these occurs, just refill the printer and press Enter. All errors
messages give you the same choices: Enter to try again and continue,
or ESC to quit.
MLPRINT will read and print the whole address file you have specified,
stopping only for refills as needed. When complete, if you are printing
labels, MLPRINT will eject the last page even if all the labels are not
printed. When using a laser printer there is no way to print less than
a full sheet of labels and save the rest of the sheet to use at a later
JAY MUNRO IS A FREQUENT CONTRIBUTOR TO PC MAGAZINE.