
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Thank you Graham, but I must not have explained completely.
I am not using the address block. I have the fields set up as you suggest,
but if I open the data file (txt file) in Word and turn on the non-printing
characters, there is a pilcrow after Address2, and the City, State and Zip
field are unnecessarily forced to the next row. This is occuring in each
record. I am thus getting an extra row whether Address2 is populated or is
null.
If I import the data into Excel, field headers are on row1, the two name
fields and address fields are on row 2 and city, state and zip are on row 3.
Subsequent records likewise take two rows.
> If you are trying to use the addressblock field, don't! Just place the
> address fields as you require them.
[quoted text clipped - 19 lines]
> > I hope this explanation is understandable, the cause is certainly not.
> > How can I correct this problem?
Peter Jamieson - 23 Feb 2008 18:47 GMT
You could consider using WOrd find and replace to remove the additional
return, e.g. if you have
field1,field2,address,
city,state,zip
field1,field2,address,
city,state,zip
field1,field2,address,
city,state,zip
then you could find ",^p" and replace with "," (both expressions without
quotes)
Obviously if you are trying to automate then that would require an extrea
set of steps and there would probably be a better way to do it. But if you
are actually getting
field1,field2,address
city,state,zip
then things are a bit different. What is in the field that the AS400 people
are exporting from?

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> Thank you Graham, but I must not have explained completely.
>
[quoted text clipped - 37 lines]
>> > I hope this explanation is understandable, the cause is certainly not.
>> > How can I correct this problem?
Doug Robbins - Word MVP - 23 Feb 2008 22:52 GMT
As an alternative to Peter's method
Dim i As Long
With ActiveDocument
For i = .Paragraphs.Count - 1 To 1 Step -2
.Paragraphs(i).Range.Characters(.Paragraphs(i).Range.Characters.Count).Delete
Next i
End With
or, if there is no comma at the end of the first row of data for each
record, use
Dim i As Long
With ActiveDocument
For i = .Paragraphs.Count - 1 To 1 Step -2
.Paragraphs(i + 1).Range.InsertBefore ","
.Paragraphs(i).Range.Characters(.Paragraphs(i).Range.Characters.Count).Delete
Next i
End With

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Thank you Graham, but I must not have explained completely.
>
[quoted text clipped - 37 lines]
>> > I hope this explanation is understandable, the cause is certainly not.
>> > How can I correct this problem?