View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Fix a txt data file

If you are trying to use the addressblock field, don't! Just place the
address fields as you require them.
You can conditionally insert Address2 if necessary to avoid empty lines when
the field has no data eg
{Mergefield Address1}{If {Mergefield Address2} "" "
{Mergefield Address2}
(Mergefield City} etc


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


PA wrote:
My company has decided to download selected customer information,
monthly, from one of our AS400 mainframes into a text file and then
do a mail merge with Word. There will be approximately 500 letters
to be generated, each month.
The fields to be used a
"Fname","Lname","Address1","Address2","City","Stat e","Zip"
The problem is, there is a line break between the address2 field and
the city field in the data, so that there is an extra line in the
address. I opened the text file in Word and see a paragraph mark,
forcing city field to the next line in the word file. The inside
address will therefore not fit properly in the window envelope. The
field labels in the first row are on one line, the problem begins in
the data itself.
I hope this explanation is understandable, the cause is certainly not.
How can I correct this problem?