www.fireflysoftware.com

Create Mailing Labels from a List of Addresses


Suppose you had a list of names and addresses that you needed to create mailing labels from:

Jim Philips             1290 Pin Oak Ln           Westhaven, FL 77392
Ted Crowder             7382 West 21st St.        Lincoln, AR 72882
Lisa Taylor             1213 Pompano St.          Norden, TX 77283
Laura Michelson         1550 Fenn Way Blvd.       Treeville, CO 77662
Peter Piper             8399 Fourth St.           Ashton, CT 72882
William Orson           7113 France Ave.          Linden KY 66383
Susan Simpson           728 Conner Peak St.       Freemont IN, 45892
----+----1----+----2----+----3----+----4----+----5----+----6----+----7

If your label stock is one label wide, you could simply execute the following pipe,

AppendStr '#0d#0a' 
SplitLines 26 51

to obtain the desired output:

Jim Philips
1290 Pin Oak Ln
Westhaven, FL 77392

Ted Crowder
7382 West 21st St.
Lincoln, AR 72882

Lisa Taylor
1213 Pompano St.
Norden, TX 77283

Laura Michelson
1550 Fenn Way Blvd.
Treeville, CO 77662

Peter Piper
8399 Fourth St.
Ashton, CT 72882

...

The AppendStr filter is used to first double-space the list of names and the SplitLines filter then splits each line into 3 separate lines. Note that the SplitLines filter doesn't affect the blank lines as their length, (0) is less than the column positions 26 and 51 at which splitting takes place.

Now, suppose you wanted the labels to be printed on a laser printer, 3 across by say, 15 deep per page. Adding three more filters to the original pipe gives us the pipe:

AppendStr '#0d#0a' 
SplitLines 26 51
PadLinesRight ' ' /w25
ColumnOrder 12 3 
JoinLines 3 

Its execution delivers the following output:

Jim Philips              Laura Michelson          Susan Simpson 
1290 Pin Oak Ln          1550 Fenn Way Blvd.      728 Conner Peak St. 
Westhaven, FL 77392      Treeville, CO 77662      Freemont IN, 45892 

Ted Crowder              Peter Piper 
7382 West 21st St.       8399 Fourth St. 
Lincoln, AR 72882        Ashton, CT 72882 

Lisa Taylor              William Orson 
1213 Pompano St.         7113 France Ave. 
Norden, TX 77283         Linden KY 66383 

----+----1----+----2----+----3----+----4----+----5----+----6----+----7

In this particular example, I limited the output to 3 labels deep by specifying 12 rows in the ColumnOrder filter instead of the 28 that would be required for a single column, (7 labels x 4 lines per label). This allowed the output to span 3 columns for the sake of demonstration.

 

[Home] [Contact Us] [Downloads] [Purchase/Register]

Copyright © 2005 Firefly Software