From: jewell@mace.cc.purdue.edu (Larry Jewell)
Newsgroups: comp.sys.mac.apps
Subject: Word 4.0 variable length lables (summary)
Date: 27 Aug 92 14:20:02 GMT
Organization: Purdue University


I posted the note below concerning variable numbers of lines in Word 4.0
and I've appended the messages from the people who were kind enough to answer
in hopes that someone else won't have to look to hard for the information.

Thanks to all of you for your help.

Larry J
................................................................................

Hi, one of the ladies at work asked me to yell for help.
 
She's printing labels with either 5 or 6 lines depending on the presence of 
an organization name.  She can remove the empty line with an if-endif statement,
but this doesn't add a blank line after the address to keep them properly
spaced on the labels when printed.
 
If anyone know the proper why to say "if there is only five lines in the 
address, add an extra carriage return at the end of the address" please let me
know.
 
(If this description seems completely whacked-out, it because I don't do 
this myself, and am trying my best to describe what she wants to do.)
 
E-mail or post, either way works for me.
 
 advTHANKSance,
 Larry J
................................................................................
From dana@are.Berkeley.EDU Wed Aug 19 18:37:54 1992

Here's what I managed to get to work for me to handle situations
where there may or may not be a second and third address line (in
addition to the name line and the city, state, zip line and one
address line). The notation (newline) in this note means the little
arrow return that one gets in word by typing shift return.

<<name>>(newline)
<<IF firstline>><<firstline>>(newline)
<<ENDIF>><<IF secondline>><<secondline>>(newline)
<<ENDIF>><<IF thirdline>><<thirdline>>(newline)
<<ENDIF>><<city>>, <<state>> <<zip>><<IF secondline="">>(newline)
<<ENDIF>><<IF thirdline="">>(newline)
<<ENDIF>><<NEXT>>(paragraph return)
-- 
                                                Dana
...............................................................................
From ford@SEI.CMU.EDU Thu Aug 20 09:18:16 1992

Here's the way I do it.  The idea is to first use IF statements to
put in the name and address lines (as many as there are), and then
use IF statements to put in line breaks for each address line that
did not exist.  This forces each label to be the same number of
total lines.  In the stuff below, a line break is indicated by LB;
it is indicated by a bent left-pointing arrow in Word; type
shift-return in Word to get one.

<<Name>>LB
<<Address1>>LB
<<IF Address2>><<Address2>>LB
<<ENDIF>><<IF Address3>><<Address3>>LB
<<ENDIF>><<IF Address4>><<Address4>>LB
<<ENDIF>><<IF Address5>><<Address5>><<ENDIF>><<IF Address2>><<ELSE>>LB
<<ENDIF>><<IF Address3>><<ELSE>>LB
<<ENDIF>><<IF Address4>><<ELSE>>LB
<<ENDIF>>

Gary Ford
Software Engineering Institute
Carnegie Mellon University
................................................................................
From jeffe@eniac.seas.upenn.edu Thu Aug 20 13:39:14 1992

the way i do it: use positioned paragraphs to locate each label
-that way you can have 2,3,4.. lines without worry.

otherwise..
[it been a little while, my syntax may be a little rough ]

<if field><field>
<else>
<endif>

should do, where 'field' does not in itself contain carriage return

if 'field' already contains your return then you need to do something
like
<if field><field><endif><if field><else>
<endif>

if you need to do this, you probably should re-think the formating
of the data document..
................................................................................

From davids@gardener.lanl.gov Fri Aug 21 12:25:06 1992

Use the "anti if-end-if"... as in, turn hte if-end-if statment around, so if
if it is true in case 1, it will be false in case 2, and vice versa.
YOu know how to remove a line in the case-false to remove the offending line, so
adding a line in the case-true should also be trivial.

Was that unclear enough for you?

so....<<IF <field A> then "CR">>
      <<end if>>
      More stuff
      <<if <not field A> then "CR">>
      <<end if>>
or somesuch.

Cheers! 
-- 

David G. Simmons
davids@lanl.gov

If I said it, LANL didn't... 
................................................................................
From dcarson@microsoft.com Sat Aug 22 14:37:32 1992

Larry, if the labels are put into a table (with an exact row height) 
then you can use the IF/ENDIF statements however you like and it won't 
change the label's length.

Email me at dcarson@microsoft.com if you have any further questions.

David Carson
Microsoft Word Support
................................................................................

From mlevins@metz.une.edu.au Thu Aug 27 07:16:26 1992
 
Trydoing the same thing at the end of each record as you do at the beginning;
ie an IF statement, but, rather than print the orgname, print a carriage
return
(it's a bit hard without all the special chars)

another ie: you have TWO IF statements, one to print the orgname (if it
exists) and another to print the extra carriage return.



Martin Levins                               Internet: mlevins@metz.une.edu.au
Director of Computing                                     Applelink: AUST0479
The Armidale School                                      Phone: +61.67.738219
Australia                                                  Fax: +61.67.738230


-- 
#Larry W. Jewell (ex-USN)     WWII-L Listowner    jewell@mace.cc.purdue.edu # 
#"Sunday's horoscope is noteworthy because of its strange, sudden and wholly#
#unpredictable and inexplicable occurrences, affecting all phases of life." #
#--"Your Horoscope," L.A. Evening Herald Express, Saturday, Dec. 6, 1941.   #
Xref: sparky comp.sys.mac.apps:13934 comp.sys.mac.hardware:16172