SlideShare a Scribd company logo
1 of 6
Download to read offline
Creating Envelope Barcod
Tracking Vehicle Mileage
$3 us
$4 CANADA
A D V A.:.M C E D
.-.L4i
CREATING BARCODES WITH
MACROS AND MERGE
B Y K E V I N M A R S H A L L
D I D YOU KNOW WORDPERFECT CAN SPEED UP YOUR
mail and lower your mailing costs? That is, it can
if you use bulk mailing along with the merge/
macro combination explained in this article.
Mail is delivered more efficiently if you
include the full street address, city, state and zip
code (preferably nine digits). You can improve
on this by including a barcode on the envelope
(Figure 1). Adding a barcode to the address
allows the mail to be sorted by a high-speed
barcode sorter rather than by hand.
Read on to create the merge/macro
combination that will produce bar-
codes f r o m a five or a nine
(ZIP+4) digit zip code. Note: For
the instructions below to work,
you must use a WordPerfect 5.1
release dated 1/19/90 or later.
T H E B A R C O D E S
It's fairly easy to read and understand barcodes.
A barcode consists of either six or 10 combi-
nations of bars, each combination consisting of
five bars plus two "frame" bars. These frame
bars are simply two long bars that surround or
"frame" the combination of bars.
The first five or nine bar combinations rep-
resent the digits of the zip code. The last com-
bination of bars is a correction digit used by the
barcode reader to identify reading errors. The
correction digit is calculated by finding the sum
of the digits i n the zip code and then deter-
mining what single-digit number must be
added to that sum to inake the total a multiple
of 10. For example, if the sum of the digits of a
zip code were 45, then using a correction digit
of 5 makes the sum of all 10 digits 50—a mul-
tiple of 10.
In Figure 2, each of the zip code digits and
the correction digit are represented by two long
bars (represented by a "1") and three short bars
(represented by a "0"). Refer to Figure 2 to see
the combinations that digits 0 through 9 have
been assigned
to.
With the exception of 0,
the numeric value of each code is determined
by summing the values of the positions of the
two long bars (I's) in each code segment. From
left to right, the positions have the values 7, 4,
2,1 and 0. So, for example, looking at the code
segment for the number 5 you'll see a long bar
in the second and fourth positions. These have
the values of 4 and 1 respectively, which total
5 when added.
W H E R E IS T H E C O D E P R I N T E D ?
Barcodes are generally printed in the lower
right corner of an envelope vath the bottoin of
the barcode exactly .25" from the bottom of the
envelope. However, this presents problems for
some laser printers which have unprintable
Your mail can
fly 1st class
"while you only
^ayfor coach
W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9 2
A D V A N C E D
7
1 { A S S l G N I z i p - I F l E L D l z i p - - I C O M M E N T )
2 ~ | A S S l G N ) c o r r e c t - 0 - ( C O M M E N T l
3 - { A S S I G N Islop-1LEN1 ( V A R I A B L E !zip 2-{ C O M M E N T )
4 - . | f F O R ) c o u n t ~ 0 ~ ( V A R I A B L E ) s l o p - . ~ l ~ | C O M M E N T l
5 - l A S S I G N l d i g i l - I M I D l l V A R I A B L E I z i p — I V A R I A B L E l c o u n t — l — I C O M M E N T )
6 - (IF)" ( V A R I A B L E jdigit- j C O M M E N T )
7 ~ I D O C U M E N T )barcode. I V A R I A B L E jdigit— | C O M M E N T )
8 ~(ASSIGN)correct-{VARIABLE)correct--+(VARIABLE)digit--(COMMENT)
9 - { E N D I F J I E N D F O R ) | C O M M E N T )
16— -1A-SSIGI-J) LUiTetMO- (I V A R I A 6 L E | e e f r e c t - % l - 6 - M e O M M E N T )
11 - | D O C U M E N T ) b a r c o d e . { V A R I A B L E ) c o r r e c t ~ - l
12 {FIELD)address~ | F I E L D ) z i p ~ ^
S c r e e n 1 . B A R C O D E . P R I — T h i s file m e r g e s w i t h y o u r a d d r e s s file t o p r o d u c e a n
e n v e l o p e c o n t a i n i n g b a r c o d e s f o r t h e z i p c o d e . B e s u r e t o i n c l u d e a s p a c e o n line 1 after
" { F I E L O } z l p - " a n d a l s o i n c l u d e a s p a c e at t h e e n d o f line 1 1 .
Woidl^rfecf
PUBLISHING CORPORATION
270 V»nl (jmr SUM
Orm,Ulc* 84057
l„l,l„l,lll,„l„l,„l,M„l,M,llll Il.llnl
Automation Division
USPS Engineering & Development Center
&403 Lee Highway
Merrifield, VA 22082-8101
F i g u r e 1 . T h i s i s a s a m p l e e n v e l o p e w i t h t h e b a r c o d e a b o v e t h e s e n d i n g a d d r e s s .
zones greater than .25". Consequently, if
you have one of those printers, it's impos-
sible to print the barcode low enough.
Fortunately, the U.S. Postal Service
recently made changes so that the barcode
may be printed as the /irst line in the
address block. This is where the merge
file below places the barcode.
The merge file can be modified to print
the barcode and address on mailing labels.
If this is done, the spacing from the top
edge of the label to the top of the barcode
must be at least .04". Also, the spacing
from the left edge of the label to the first
frame bar must be at least .125".
Other general specifications include the
following: The height of the tall bar must
be .125" ± .01". The height of the short
bar must be .05" ± .01". The width of each
bar must be .02" ± .005". There must also
be 21 ± 1 bars per inch. For more infor-
mation about barcodes, pick up a copy of
Publication 25 from your local post office,
or write to the first address shown in
Screen 2. For information on how to
obtain a ZlP+4 directory, write to the sec-
ond address shown in Screen 2.
T H E M A C R O S
The following two macros aid in creating
the barcode segments, which are saved as
files and later retrieved by the merge file.
Once the barcode segment files are com-
plete, these macros may be deleted
because they'll never be used again unless
you delete the files created by the macros.
The first macro creates the long bars.
Begin creating the macro by pressing
Macro Define (Ctrl-FlO), then pressing
(Alt-L) or another Alt-letter name. Now
type a description, if you like, and press
(Enter). Macro Def will begin blinking in
the lower left comer of your screen.
Now press Graphics (Alt-F9), (4) User
Box and (1) Create. Next press (4)
Anchor Type, (3) Character, then (7) Size
and (3) Set Both. Enter 0.048" for the
width and 0.125" for the height. Press
Exit (F7) and Macro Define (Ctrl-FlO) to
turn the macro off.
The second macro creates the short
bars. Begin by first pressing Macro Define
(Ctrl-FlO), then press (Alt-S) or another
Alt-letter name, type a description and
press (Enter).
Now press Graphics (Alt-F9), (4) User
Box and (1) Create. Next press (4) Anchor
Type, (3) Character, then (7) Size and (3)
Set Both. Enter 0.048" for the width and
0.05" for the height. Press Exit (F7) and
Macro Define (Ctrl-FlO) to turn the
macro off, then clear your screen.
USING T H E M A C R O S
Using graphic boxes, the first macro (Alt-
L) creates a long bar, while the second,
(Alt-S), creates a short bar. Use these
macros to create barcode segments for
each of the numbers 0 through 9 listed in
Figure 2. For example, to create the seg-
ment for "0" press (Alt-L), (Alt-L), (Alt-S),
(Alt-S) and (Alt-S). This gives you long,
long, short, short and short. If you view
the document at this point using View
Document, you'll get a blank screen. Don't
panic; you've done it correctly. The pri-
mary file takes care of inserting the seg-
ments visibly.
Save the segment as BARCODE.0, clear
your screen and continue this process,
saving the segment for number 1 as BAR-
CODE. 1, etc. until you've finished with
the ninth segment.
0 - 11000
(II...)1 -00011
(...II)2 -00101
(..I.I)3 -00110
(..II.)4 - 01001
(.I..I)5 - 01010
(.1.1.)6 - 01100
(.11..)7 - 10001
(I...I)8 - 10010
(I..I.)9 - 10100
(I.I..)
F i g u r e 2. E a c h o f t h e z i p c o d e d i g i t s a n d t h
c o r r e c t i o n d i g i t i n a b a r c o d e a r e r e p r e s e n t -
e d b y t w o l o n g b a r s ( r e p r e s e n t e d b y a " 1 " )
a n d t h r e e s h o r t b a r s ( r e p r e s e n t e d b y a " 0 " ) .
Editor's note: It's very important that you
create these segments properly, using the
macros in the right combination.
If these files aren't coded in the prope
sequence, you'll have faulty barcodes on
your letters, which could result in higher
postage costs.
T H E P R I M A R Y FILE
The primary file i n Screen 1 w i l l be
merged w i t h your secondary file (see
Screen 2), resulting in envelope files com
plete with the barcodes. ->
28 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9 2
A D V A N C E D
In this primar)' file, it's important to
place the envelope paper size, margins,
and graphic option codes in Document
Initial Codes so that the barcode will print
correctly. Do this by first going to a blank
screen, then pressing Format (Shift-F8),
(3) Document and (2) Initial Codes.
Again press Format (Shift-F8), (2) Page
and (7) Paper Size. Highlight your enve-
lope paper size and press (1) Select.
Now press (5) N'iargins and enter 2" for
the top margin and 0.625" for the bottom
margin. Press (Enter) once and choose
(1) Line and (7) Margins. Enter 4.5" for
the left margin and press (Enter) again to
leave the right margin at 1". Press (Enter)
(FIELD N,-MES|addrcss~zip~~{END RECORD!
AuLomaiion Division
tJSPS Engineering & Development Center
8403 Lee Higliway
M e r r i f i e l d , V A { E N D F I E L D |
22082-8101{END FIEi_Dl
(END RECORD!
US Postal Ser'ice
ZIP+4 State Directon- Orders
National Address Information Center
6060 Primacy PKY STE 101
Memphis, T N ( E N D FIELD!
38188-0001(END FIELD!
(END RECORD)
S c r e e n 2. B A R C O D E . S E C — S a m p l e
s e c o n d a r y file w i t h t h e z i p c o d e i n a
s e p a r a t e f i e l d .
to return to the main Format menu, the
choose (4) Other, (8) Border Options an
(1) Single. Enter 0.02" for the Width, the
press (Enter) to leave Shading at 100%.
Press Exit (F7) to go back to the Initi;
Codes screen, ihen press Graphics (Al
F9), (4) User Box and (4) Options. Sele(
(1) Border Style and change Left to (2
Single, then press (Enter) three time;
leaing the rest at iNone. Finally, select (2
Outside Border Space and enter 0" for a
four sides.
When finished, press Exit (F7) thre
limes to return to the main editing screer
then select a font that will give you si
lines per inch—like a 10-point or 12 c]:
font. Do this by pressing Font (Ctrl-F8^
(4) Base Font, then highlighting an
selecting an appropriate font.
Now enter the codes for the primaiy fil
as shown in Screen 1. Be sure to read th
following tips before entering the merg
commands.
• Don't insert the numbers on the lef
the''re for reference puq^oses only.
• The advance merge commands show
in braces ( | 1 ) are entered by pressin
Merge Codes (Shift-F9), (6) More, high
lighting the appropriate command an
pressing (Enter).
• Anything that isn't in braces (U)
manually tx-ped.
• The (FlELD) command on lines 1 an
12 can be accessed quicker by pressin
Merge Codes (Shift-F9), (1) Field, typin
^ ^ ^ ^ ^ ^
531 East Elliot Road, Suite 145, Chandler, AZ 85225-1118
C I R C L E 2 6 O N R E A D E R S E R V I C E C A R D
3 0 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9
the field name and pressing (Enter).
• When inserting the {COM.MENT}
codes, press Vlerge Codes (Shift-F9)
twice, highlight (COMMENT) and press
(Enter) twice. Press (Left Arrow) to place
the cursor between the code and the tilde,
then press (Enter) to insert a Hard Return
([HRt]). Press (Right Arrow) to go to the
right of the tilde. Since anything between
a ( C O M M E N T ) a n d its tilde (~) is
ignored, and since pressing (Enter) actu-
ally inserts a Hard Return ([HRt]) into the
document, placing the hard r e t u r n
between the (COMMENT) and the tilde
(~) allows the merge to run without actu-
ally inserting unwanted hard returns.
• It is very important that you include a
space i n the following areas: Line 1 —
There must be a space after (FlELD)zip~,
between the two tildes. Line 11—There
must be a space at the very end of this line,
after the square. These spaces cause
WordPerfect to treat the zip code as text.
If these spaces aren't included in the pri-
mary' hie, the merge won't work properly.
• The squares shown at the beginning of
line 3 and the end of line 11 represent the
opening and closing "frame" bars of the
barcode discussed earlier. Use the (Alt-L)
macro to put these in the primaiy file.
• Since this file is created using an enve-
lope paper size (4" high), not all of the
commands can fit on one page. Because of
this, WordPerfect will insert a page break,
probably between lines 8 and 9, and place
the rest of the commands on a new page.
This page break won't affect the final
merged file.
• On line 12, press (Space Bar) twice
after (FIELD)address~ to place space
between the address and zip code.
• When you've finished, press Save
(FIO), t}'pe barcode.pri and press (Enter).
Then clear your screen.
THE S E C O N D A R Y FILE
A secondaiy file is a "database," contain-
ing the names and addresses of those
you'll be mailing to. Each part of the recip-
ient's information may be placed in a sep-
arate field, or i n a field together. For
instance. Screen 2 contains a sample sec-
ondar)' file. The name and address are in
the first field and the zip code is i n the
second field. You may have as many or as
few fields as you need, as long as the zip
code is in its own separate field.
Nouce the (FIELD NAMES) code at the
top of the secondaiy file in Screen 2. This
code must be at the top of your secondar)'
file for the process to work correctly. The
text after your (FIELD NAVIES) com-
mand may look different, depending on
the number of fields you have in each
record, as well as where the address and
zip code are placed in each record.
Start creating your own secondaiy file
b)' pressing Vlerge Codes (Shift-F9), (6)
More, highlighting (FIELD NAMES) and
pressing (Enter). At each prompt, type a
descriptive name for all of your fields. The
field where the zip code is located must be
named "zip." Press (Enter) twice after
entering the last field name. Note: You
may also retrieve a previously created sec-
STEDMANS
x4t last,., the ultimate medical word list.. .from the
people who wrote the book on medical words.
Introducing STEDMAN'S/25 for WordPerfect®.
Physicians and other health professionals have relied on our Sredman's Medical Dictionary
for the better part of a century Now. a new member of the STEDMANS family...
STEDMAN'S/25 for WordPerfect... brings all the medical word power of'sTEDMAN'S
new 25th edition to vour WordPerfect spell checking. And that's not all!
With STEDMAN'S/'25 you get:
Enhanced installation—now easier than ever
165,000+ word list—designed to eliminate false stops at
plurals, adjectives, adverbs, and other alternate forms
"Special " cheiracter recognition—like Greek letters and diacritical markings
Medical Common Word List—a powerful feature found only in S T E D M A N ' S / 2 5
lor WordPerfect—the key to fast, efficient medical spell checking
Give your WordPerfect spell checking the mediced muscle
you need with STEDMAN'S/25I
Instantly adds
165,000 medical terms
to WordPerfect's
spell checker.
Medical/legal version
available April 1992
Contact your local software dealer, medical bookstore,
orchil tr>1'-frpc 1-800-527-5397,
Registered users receive a FREE PocketStedman's Dictionary.
STEDMANS
WILLIAMS & WILKINS ELECTRONIC MEDIA
428 East Preston Street, Baltimore, Maryland 21202
S99.50.
Available for
IBM and Mac.
Call for info on
Mum-User/LAN.
UNIX, VjVi. antl U.K.
versions.
Sledman's and STEDMAN'S/25 are registered trademarks of Vi/illiams & Wilkiris. WordPerfect a registered
trademark of WordPerfect Corp. Ali other trademarks acknowledged WPfulAGADR #90006 91
C I R C L E 59 O N R E A D E R S E R V I C E C A R D
W O R D P E R F E C T T H E rutAGAZItslE • A P R I L 1 9 9 2 31
A D V A N C E D
ondary file and insert these codes at the
top. Just make sure each zip code i n this
file is in a field separate from the rest of the
address.
Now i)npt in the data for the first field
and press End Field (F9). The name of
each field will be displayed in the lower
left comer of the screen. Enter your data,
pressing End Field (F9) at the end of each
field.
When the record is complete, press
Merge Codes (Shift-F9), (2) End Record.
T)'pe each record in this manner. Remem-
ber, if you already have a secondar)' file,
make sure the zip code is i n its own field.
Your secondar)' file should look similar
to Screen 2. Save (FIO) the file as BA
CODE.SEC and clear your screen.
USING T H E M E R G E
To merge your files, press Merge/So
(Ctrl-F9) and (1) Merge. Enter barcode.]
as your primar)' file and havcode.sec
your secondary file.
The files will be merged with inform
tion pulled i n from the BARCODE
(where x = the number) file for the b
code. You may then Print (Shift-F7) yoi
envelopes as usual.
E X P L A N A T I O N
As each record merges, lines 1 and
(Screen 1) initialize key variables. Line
assigns variable "zip" the contents in fie
"zip" (plus a trailing space), while line
assigns variable "correct" the value of C
Line 3 finds the number of digits in t
zip code. This information will then
used i n lines 4-9 to determine how mai
times that loop should be run. This wa
the merge will work with both five ai
nine-digit zip codes.
Line 4 sets up a {FOR} loop so that lin
5 through 9 will be repeated for each di|
of the zip code. Line 5 uses the {Mi
command to assign to variable "digit"
single digit of the zip code. If line 6 is tr
(meaning the current digit or character
not a dash), lines 7 and 8 are processe
Line 7 retrieves the appropriate barco
segment and line 8 assigns to "correc
the sum of the current value of "corree
and the current value of "digit."
Once the loop is completed, line 10 c
culates the needed correction digit by su
tracting from 10 the remainder obtain
by dixading the value i n "correct" by
and assigning the result to "correct." Li
11 then retrieves the appropriate barco
segment file for the correction characte
Finally, line 12 holds the field codes
the information in these fields in your s(
ondary file will also be printed on t
envelope.
Thanks to WordPerfect's merge a
macro features, your mail can fly 1st ch
while you only pay for coach. •
A p p l i c a t i o n s a v a i l a b l e
Disk of the Month, p a g e €
Take
contro
ofyour
firm's
WordPerfect
documents
If finding a document in your firm's
WordPerfect system is a nightmare,
take control with LawClerk, the legal
document retrieval system.
Designed just for law offices,
LawClerk is a powerful, easy-to-use,
menu-driven program that acts as an
integral part of WordPerfect in a single
workstation or a network, using
famiUar function keys.
LawClerk saves and names
documents according to firm-defined
databases— all displayed on-screen
and automatically entered to assure
consistency and reduce keystrokes.
=H uiciert'n.o
Date; 01/31/9i Cofr/riqht (c) 1991, CSC Softwre, Inc. Tiie: 11:H;2B
ll^Hove Esc/Fl=^it -J=Select
Action Hem k
Edit Hatter Docment Description Date
I Delete
ISott
Utilities
i find
Secretary
&x Desc * CoMent
CciKil
Hatter Type
Lawyer
Lawyer f Dx Desc
DOS Dir i Filenaic
Date
Secretary * Date
Client laie
0014E
00311
00310
00319
00119
003(9
General Pawr of Attorney
Acceptance of Service
Contract for Services
Letter of Intent
Pleading
Deposition
Affidavit
01/15/91
ei/lS/91
01/11/91
«1/1!/91
01/12/91
01/19/91
12/11/90
Client Kaie:
Hatter Naie;
Hatter Type;
Bser ID;
Attorney;
cownt;
ax DU;
Filcnaie:
XYZ Financial Services, inc.
Restructure of Bond issues
EOT Boraiino and Related Activities
HA."1 Hyland, Hictiael A.
iios Callaway, Ross L.
ResMflse d-je ir/ 02/28/91
C;i)SEllD0CSBOU)
uin6
Find a record by Client Hulber + Ratter
Retrieving a document is easy with
LawClerk because anyone in your firm
using WordPerfect can quickly find
and retrieve any document with only a
keystroke or two—in WordPerfect
files, on diskette or on hard disk
archives.
Take control of your firm's
documents with LawClerk.
For more informalm, call lotl-free
1-800-348-7996
LEGAL DOCUMENT RETRIEVAL SYSTEM
CSC Software, Inc. P.O. Box 11527 Columbia SC 29211
C I R C L E 2 2 O N R E A D E R S E R V I C E C A R D
3 2 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1E

More Related Content

Similar to WPM199204_Barcodes

Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersSheila Sinclair
 
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docx
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docxINPUT AND OUTPUT PROCESSINGPlease note that the material o.docx
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docxjaggernaoma
 
Comparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementComparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementIJMER
 
CIS/336 ilab 1 of 7
CIS/336 ilab 1 of 7CIS/336 ilab 1 of 7
CIS/336 ilab 1 of 7ashhadiqbal
 
Symbology upc
Symbology upcSymbology upc
Symbology upccri fan
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1CIS339
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1CIS339
 
Digital Roots and Their Properties
Digital Roots and Their PropertiesDigital Roots and Their Properties
Digital Roots and Their PropertiesIOSR Journals
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mpMSc CST
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Addergueste731a4
 
Bis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-newBis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-newassignmentcloud85
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1jackiechaner
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1CIS339
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1CIS339
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1CIS339
 

Similar to WPM199204_Barcodes (20)

Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
 
924k.pdf
924k.pdf924k.pdf
924k.pdf
 
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docx
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docxINPUT AND OUTPUT PROCESSINGPlease note that the material o.docx
INPUT AND OUTPUT PROCESSINGPlease note that the material o.docx
 
Comparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementComparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for Improvement
 
CIS/336 ilab 1 of 7
CIS/336 ilab 1 of 7CIS/336 ilab 1 of 7
CIS/336 ilab 1 of 7
 
Symbology upc
Symbology upcSymbology upc
Symbology upc
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Digital Roots and Their Properties
Digital Roots and Their PropertiesDigital Roots and Their Properties
Digital Roots and Their Properties
 
Sort presentation
Sort presentationSort presentation
Sort presentation
 
CST2403 NOTES
CST2403 NOTESCST2403 NOTES
CST2403 NOTES
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
L08.pdf
L08.pdfL08.pdf
L08.pdf
 
Bis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-newBis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-new
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 

WPM199204_Barcodes

  • 1. Creating Envelope Barcod Tracking Vehicle Mileage $3 us $4 CANADA
  • 2. A D V A.:.M C E D .-.L4i CREATING BARCODES WITH MACROS AND MERGE B Y K E V I N M A R S H A L L D I D YOU KNOW WORDPERFECT CAN SPEED UP YOUR mail and lower your mailing costs? That is, it can if you use bulk mailing along with the merge/ macro combination explained in this article. Mail is delivered more efficiently if you include the full street address, city, state and zip code (preferably nine digits). You can improve on this by including a barcode on the envelope (Figure 1). Adding a barcode to the address allows the mail to be sorted by a high-speed barcode sorter rather than by hand. Read on to create the merge/macro combination that will produce bar- codes f r o m a five or a nine (ZIP+4) digit zip code. Note: For the instructions below to work, you must use a WordPerfect 5.1 release dated 1/19/90 or later. T H E B A R C O D E S It's fairly easy to read and understand barcodes. A barcode consists of either six or 10 combi- nations of bars, each combination consisting of five bars plus two "frame" bars. These frame bars are simply two long bars that surround or "frame" the combination of bars. The first five or nine bar combinations rep- resent the digits of the zip code. The last com- bination of bars is a correction digit used by the barcode reader to identify reading errors. The correction digit is calculated by finding the sum of the digits i n the zip code and then deter- mining what single-digit number must be added to that sum to inake the total a multiple of 10. For example, if the sum of the digits of a zip code were 45, then using a correction digit of 5 makes the sum of all 10 digits 50—a mul- tiple of 10. In Figure 2, each of the zip code digits and the correction digit are represented by two long bars (represented by a "1") and three short bars (represented by a "0"). Refer to Figure 2 to see the combinations that digits 0 through 9 have been assigned to. With the exception of 0, the numeric value of each code is determined by summing the values of the positions of the two long bars (I's) in each code segment. From left to right, the positions have the values 7, 4, 2,1 and 0. So, for example, looking at the code segment for the number 5 you'll see a long bar in the second and fourth positions. These have the values of 4 and 1 respectively, which total 5 when added. W H E R E IS T H E C O D E P R I N T E D ? Barcodes are generally printed in the lower right corner of an envelope vath the bottoin of the barcode exactly .25" from the bottom of the envelope. However, this presents problems for some laser printers which have unprintable Your mail can fly 1st class "while you only ^ayfor coach W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9 2
  • 3. A D V A N C E D 7 1 { A S S l G N I z i p - I F l E L D l z i p - - I C O M M E N T ) 2 ~ | A S S l G N ) c o r r e c t - 0 - ( C O M M E N T l 3 - { A S S I G N Islop-1LEN1 ( V A R I A B L E !zip 2-{ C O M M E N T ) 4 - . | f F O R ) c o u n t ~ 0 ~ ( V A R I A B L E ) s l o p - . ~ l ~ | C O M M E N T l 5 - l A S S I G N l d i g i l - I M I D l l V A R I A B L E I z i p — I V A R I A B L E l c o u n t — l — I C O M M E N T ) 6 - (IF)" ( V A R I A B L E jdigit- j C O M M E N T ) 7 ~ I D O C U M E N T )barcode. I V A R I A B L E jdigit— | C O M M E N T ) 8 ~(ASSIGN)correct-{VARIABLE)correct--+(VARIABLE)digit--(COMMENT) 9 - { E N D I F J I E N D F O R ) | C O M M E N T ) 16— -1A-SSIGI-J) LUiTetMO- (I V A R I A 6 L E | e e f r e c t - % l - 6 - M e O M M E N T ) 11 - | D O C U M E N T ) b a r c o d e . { V A R I A B L E ) c o r r e c t ~ - l 12 {FIELD)address~ | F I E L D ) z i p ~ ^ S c r e e n 1 . B A R C O D E . P R I — T h i s file m e r g e s w i t h y o u r a d d r e s s file t o p r o d u c e a n e n v e l o p e c o n t a i n i n g b a r c o d e s f o r t h e z i p c o d e . B e s u r e t o i n c l u d e a s p a c e o n line 1 after " { F I E L O } z l p - " a n d a l s o i n c l u d e a s p a c e at t h e e n d o f line 1 1 . Woidl^rfecf PUBLISHING CORPORATION 270 V»nl (jmr SUM Orm,Ulc* 84057 l„l,l„l,lll,„l„l,„l,M„l,M,llll Il.llnl Automation Division USPS Engineering & Development Center &403 Lee Highway Merrifield, VA 22082-8101 F i g u r e 1 . T h i s i s a s a m p l e e n v e l o p e w i t h t h e b a r c o d e a b o v e t h e s e n d i n g a d d r e s s . zones greater than .25". Consequently, if you have one of those printers, it's impos- sible to print the barcode low enough. Fortunately, the U.S. Postal Service recently made changes so that the barcode may be printed as the /irst line in the address block. This is where the merge file below places the barcode. The merge file can be modified to print the barcode and address on mailing labels. If this is done, the spacing from the top edge of the label to the top of the barcode must be at least .04". Also, the spacing from the left edge of the label to the first frame bar must be at least .125". Other general specifications include the following: The height of the tall bar must be .125" ± .01". The height of the short bar must be .05" ± .01". The width of each bar must be .02" ± .005". There must also be 21 ± 1 bars per inch. For more infor- mation about barcodes, pick up a copy of Publication 25 from your local post office, or write to the first address shown in Screen 2. For information on how to obtain a ZlP+4 directory, write to the sec- ond address shown in Screen 2. T H E M A C R O S The following two macros aid in creating the barcode segments, which are saved as files and later retrieved by the merge file. Once the barcode segment files are com- plete, these macros may be deleted because they'll never be used again unless you delete the files created by the macros. The first macro creates the long bars. Begin creating the macro by pressing Macro Define (Ctrl-FlO), then pressing (Alt-L) or another Alt-letter name. Now type a description, if you like, and press (Enter). Macro Def will begin blinking in the lower left comer of your screen. Now press Graphics (Alt-F9), (4) User Box and (1) Create. Next press (4) Anchor Type, (3) Character, then (7) Size and (3) Set Both. Enter 0.048" for the width and 0.125" for the height. Press Exit (F7) and Macro Define (Ctrl-FlO) to turn the macro off. The second macro creates the short bars. Begin by first pressing Macro Define (Ctrl-FlO), then press (Alt-S) or another Alt-letter name, type a description and press (Enter). Now press Graphics (Alt-F9), (4) User Box and (1) Create. Next press (4) Anchor Type, (3) Character, then (7) Size and (3) Set Both. Enter 0.048" for the width and 0.05" for the height. Press Exit (F7) and Macro Define (Ctrl-FlO) to turn the macro off, then clear your screen. USING T H E M A C R O S Using graphic boxes, the first macro (Alt- L) creates a long bar, while the second, (Alt-S), creates a short bar. Use these macros to create barcode segments for each of the numbers 0 through 9 listed in Figure 2. For example, to create the seg- ment for "0" press (Alt-L), (Alt-L), (Alt-S), (Alt-S) and (Alt-S). This gives you long, long, short, short and short. If you view the document at this point using View Document, you'll get a blank screen. Don't panic; you've done it correctly. The pri- mary file takes care of inserting the seg- ments visibly. Save the segment as BARCODE.0, clear your screen and continue this process, saving the segment for number 1 as BAR- CODE. 1, etc. until you've finished with the ninth segment. 0 - 11000 (II...)1 -00011 (...II)2 -00101 (..I.I)3 -00110 (..II.)4 - 01001 (.I..I)5 - 01010 (.1.1.)6 - 01100 (.11..)7 - 10001 (I...I)8 - 10010 (I..I.)9 - 10100 (I.I..) F i g u r e 2. E a c h o f t h e z i p c o d e d i g i t s a n d t h c o r r e c t i o n d i g i t i n a b a r c o d e a r e r e p r e s e n t - e d b y t w o l o n g b a r s ( r e p r e s e n t e d b y a " 1 " ) a n d t h r e e s h o r t b a r s ( r e p r e s e n t e d b y a " 0 " ) . Editor's note: It's very important that you create these segments properly, using the macros in the right combination. If these files aren't coded in the prope sequence, you'll have faulty barcodes on your letters, which could result in higher postage costs. T H E P R I M A R Y FILE The primary file i n Screen 1 w i l l be merged w i t h your secondary file (see Screen 2), resulting in envelope files com plete with the barcodes. -> 28 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9 2
  • 4. A D V A N C E D In this primar)' file, it's important to place the envelope paper size, margins, and graphic option codes in Document Initial Codes so that the barcode will print correctly. Do this by first going to a blank screen, then pressing Format (Shift-F8), (3) Document and (2) Initial Codes. Again press Format (Shift-F8), (2) Page and (7) Paper Size. Highlight your enve- lope paper size and press (1) Select. Now press (5) N'iargins and enter 2" for the top margin and 0.625" for the bottom margin. Press (Enter) once and choose (1) Line and (7) Margins. Enter 4.5" for the left margin and press (Enter) again to leave the right margin at 1". Press (Enter) (FIELD N,-MES|addrcss~zip~~{END RECORD! AuLomaiion Division tJSPS Engineering & Development Center 8403 Lee Higliway M e r r i f i e l d , V A { E N D F I E L D | 22082-8101{END FIEi_Dl (END RECORD! US Postal Ser'ice ZIP+4 State Directon- Orders National Address Information Center 6060 Primacy PKY STE 101 Memphis, T N ( E N D FIELD! 38188-0001(END FIELD! (END RECORD) S c r e e n 2. B A R C O D E . S E C — S a m p l e s e c o n d a r y file w i t h t h e z i p c o d e i n a s e p a r a t e f i e l d . to return to the main Format menu, the choose (4) Other, (8) Border Options an (1) Single. Enter 0.02" for the Width, the press (Enter) to leave Shading at 100%. Press Exit (F7) to go back to the Initi; Codes screen, ihen press Graphics (Al F9), (4) User Box and (4) Options. Sele( (1) Border Style and change Left to (2 Single, then press (Enter) three time; leaing the rest at iNone. Finally, select (2 Outside Border Space and enter 0" for a four sides. When finished, press Exit (F7) thre limes to return to the main editing screer then select a font that will give you si lines per inch—like a 10-point or 12 c]: font. Do this by pressing Font (Ctrl-F8^ (4) Base Font, then highlighting an selecting an appropriate font. Now enter the codes for the primaiy fil as shown in Screen 1. Be sure to read th following tips before entering the merg commands. • Don't insert the numbers on the lef the''re for reference puq^oses only. • The advance merge commands show in braces ( | 1 ) are entered by pressin Merge Codes (Shift-F9), (6) More, high lighting the appropriate command an pressing (Enter). • Anything that isn't in braces (U) manually tx-ped. • The (FlELD) command on lines 1 an 12 can be accessed quicker by pressin Merge Codes (Shift-F9), (1) Field, typin ^ ^ ^ ^ ^ ^ 531 East Elliot Road, Suite 145, Chandler, AZ 85225-1118 C I R C L E 2 6 O N R E A D E R S E R V I C E C A R D 3 0 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1 9 9
  • 5. the field name and pressing (Enter). • When inserting the {COM.MENT} codes, press Vlerge Codes (Shift-F9) twice, highlight (COMMENT) and press (Enter) twice. Press (Left Arrow) to place the cursor between the code and the tilde, then press (Enter) to insert a Hard Return ([HRt]). Press (Right Arrow) to go to the right of the tilde. Since anything between a ( C O M M E N T ) a n d its tilde (~) is ignored, and since pressing (Enter) actu- ally inserts a Hard Return ([HRt]) into the document, placing the hard r e t u r n between the (COMMENT) and the tilde (~) allows the merge to run without actu- ally inserting unwanted hard returns. • It is very important that you include a space i n the following areas: Line 1 — There must be a space after (FlELD)zip~, between the two tildes. Line 11—There must be a space at the very end of this line, after the square. These spaces cause WordPerfect to treat the zip code as text. If these spaces aren't included in the pri- mary' hie, the merge won't work properly. • The squares shown at the beginning of line 3 and the end of line 11 represent the opening and closing "frame" bars of the barcode discussed earlier. Use the (Alt-L) macro to put these in the primaiy file. • Since this file is created using an enve- lope paper size (4" high), not all of the commands can fit on one page. Because of this, WordPerfect will insert a page break, probably between lines 8 and 9, and place the rest of the commands on a new page. This page break won't affect the final merged file. • On line 12, press (Space Bar) twice after (FIELD)address~ to place space between the address and zip code. • When you've finished, press Save (FIO), t}'pe barcode.pri and press (Enter). Then clear your screen. THE S E C O N D A R Y FILE A secondaiy file is a "database," contain- ing the names and addresses of those you'll be mailing to. Each part of the recip- ient's information may be placed in a sep- arate field, or i n a field together. For instance. Screen 2 contains a sample sec- ondar)' file. The name and address are in the first field and the zip code is i n the second field. You may have as many or as few fields as you need, as long as the zip code is in its own separate field. Nouce the (FIELD NAMES) code at the top of the secondaiy file in Screen 2. This code must be at the top of your secondar)' file for the process to work correctly. The text after your (FIELD NAVIES) com- mand may look different, depending on the number of fields you have in each record, as well as where the address and zip code are placed in each record. Start creating your own secondaiy file b)' pressing Vlerge Codes (Shift-F9), (6) More, highlighting (FIELD NAMES) and pressing (Enter). At each prompt, type a descriptive name for all of your fields. The field where the zip code is located must be named "zip." Press (Enter) twice after entering the last field name. Note: You may also retrieve a previously created sec- STEDMANS x4t last,., the ultimate medical word list.. .from the people who wrote the book on medical words. Introducing STEDMAN'S/25 for WordPerfect®. Physicians and other health professionals have relied on our Sredman's Medical Dictionary for the better part of a century Now. a new member of the STEDMANS family... STEDMAN'S/25 for WordPerfect... brings all the medical word power of'sTEDMAN'S new 25th edition to vour WordPerfect spell checking. And that's not all! With STEDMAN'S/'25 you get: Enhanced installation—now easier than ever 165,000+ word list—designed to eliminate false stops at plurals, adjectives, adverbs, and other alternate forms "Special " cheiracter recognition—like Greek letters and diacritical markings Medical Common Word List—a powerful feature found only in S T E D M A N ' S / 2 5 lor WordPerfect—the key to fast, efficient medical spell checking Give your WordPerfect spell checking the mediced muscle you need with STEDMAN'S/25I Instantly adds 165,000 medical terms to WordPerfect's spell checker. Medical/legal version available April 1992 Contact your local software dealer, medical bookstore, orchil tr>1'-frpc 1-800-527-5397, Registered users receive a FREE PocketStedman's Dictionary. STEDMANS WILLIAMS & WILKINS ELECTRONIC MEDIA 428 East Preston Street, Baltimore, Maryland 21202 S99.50. Available for IBM and Mac. Call for info on Mum-User/LAN. UNIX, VjVi. antl U.K. versions. Sledman's and STEDMAN'S/25 are registered trademarks of Vi/illiams & Wilkiris. WordPerfect a registered trademark of WordPerfect Corp. Ali other trademarks acknowledged WPfulAGADR #90006 91 C I R C L E 59 O N R E A D E R S E R V I C E C A R D W O R D P E R F E C T T H E rutAGAZItslE • A P R I L 1 9 9 2 31
  • 6. A D V A N C E D ondary file and insert these codes at the top. Just make sure each zip code i n this file is in a field separate from the rest of the address. Now i)npt in the data for the first field and press End Field (F9). The name of each field will be displayed in the lower left comer of the screen. Enter your data, pressing End Field (F9) at the end of each field. When the record is complete, press Merge Codes (Shift-F9), (2) End Record. T)'pe each record in this manner. Remem- ber, if you already have a secondar)' file, make sure the zip code is i n its own field. Your secondar)' file should look similar to Screen 2. Save (FIO) the file as BA CODE.SEC and clear your screen. USING T H E M E R G E To merge your files, press Merge/So (Ctrl-F9) and (1) Merge. Enter barcode.] as your primar)' file and havcode.sec your secondary file. The files will be merged with inform tion pulled i n from the BARCODE (where x = the number) file for the b code. You may then Print (Shift-F7) yoi envelopes as usual. E X P L A N A T I O N As each record merges, lines 1 and (Screen 1) initialize key variables. Line assigns variable "zip" the contents in fie "zip" (plus a trailing space), while line assigns variable "correct" the value of C Line 3 finds the number of digits in t zip code. This information will then used i n lines 4-9 to determine how mai times that loop should be run. This wa the merge will work with both five ai nine-digit zip codes. Line 4 sets up a {FOR} loop so that lin 5 through 9 will be repeated for each di| of the zip code. Line 5 uses the {Mi command to assign to variable "digit" single digit of the zip code. If line 6 is tr (meaning the current digit or character not a dash), lines 7 and 8 are processe Line 7 retrieves the appropriate barco segment and line 8 assigns to "correc the sum of the current value of "corree and the current value of "digit." Once the loop is completed, line 10 c culates the needed correction digit by su tracting from 10 the remainder obtain by dixading the value i n "correct" by and assigning the result to "correct." Li 11 then retrieves the appropriate barco segment file for the correction characte Finally, line 12 holds the field codes the information in these fields in your s( ondary file will also be printed on t envelope. Thanks to WordPerfect's merge a macro features, your mail can fly 1st ch while you only pay for coach. • A p p l i c a t i o n s a v a i l a b l e Disk of the Month, p a g e € Take contro ofyour firm's WordPerfect documents If finding a document in your firm's WordPerfect system is a nightmare, take control with LawClerk, the legal document retrieval system. Designed just for law offices, LawClerk is a powerful, easy-to-use, menu-driven program that acts as an integral part of WordPerfect in a single workstation or a network, using famiUar function keys. LawClerk saves and names documents according to firm-defined databases— all displayed on-screen and automatically entered to assure consistency and reduce keystrokes. =H uiciert'n.o Date; 01/31/9i Cofr/riqht (c) 1991, CSC Softwre, Inc. Tiie: 11:H;2B ll^Hove Esc/Fl=^it -J=Select Action Hem k Edit Hatter Docment Description Date I Delete ISott Utilities i find Secretary &x Desc * CoMent CciKil Hatter Type Lawyer Lawyer f Dx Desc DOS Dir i Filenaic Date Secretary * Date Client laie 0014E 00311 00310 00319 00119 003(9 General Pawr of Attorney Acceptance of Service Contract for Services Letter of Intent Pleading Deposition Affidavit 01/15/91 ei/lS/91 01/11/91 «1/1!/91 01/12/91 01/19/91 12/11/90 Client Kaie: Hatter Naie; Hatter Type; Bser ID; Attorney; cownt; ax DU; Filcnaie: XYZ Financial Services, inc. Restructure of Bond issues EOT Boraiino and Related Activities HA."1 Hyland, Hictiael A. iios Callaway, Ross L. ResMflse d-je ir/ 02/28/91 C;i)SEllD0CSBOU) uin6 Find a record by Client Hulber + Ratter Retrieving a document is easy with LawClerk because anyone in your firm using WordPerfect can quickly find and retrieve any document with only a keystroke or two—in WordPerfect files, on diskette or on hard disk archives. Take control of your firm's documents with LawClerk. For more informalm, call lotl-free 1-800-348-7996 LEGAL DOCUMENT RETRIEVAL SYSTEM CSC Software, Inc. P.O. Box 11527 Columbia SC 29211 C I R C L E 2 2 O N R E A D E R S E R V I C E C A R D 3 2 W O R D P E R F E C T T H E M A G A Z I N E • A P R I L 1E