View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Importing records containing carriage returns

In principle that's correct, as long as # and $ do not appear in your data
and you use Word's text file converter to get the data.

However, you will also get problems if there are any double-quote characters
in your data and they are not being used as the "text delimiter", i.e. to
surround complete fields, and there may be other similar issues.

I would be inclined to wrap up every field that might contain #,$," or enter
in double-quotes and double up any double-quotes in the data. I don't think
it will make much difference which field and record delimiters you use after
that and comma and enter will probably be fine.

e.g. instead of

ID#name#address$1#us#11 "The Maltings"
in the middle of the street
ourtown$

try

ID,name,address
1,"us","11 """The Maltings""
in the middle of the street
ourtown"
etc.

Are there any other output format options that you can choose in the
Progress Repoert Builder (whatever that may be) ?

Peter Jamieson
"Steve" wrote in message
oups.com...
Hi
I'm trying to import a text file created using the Progress Report
Builder into a Word 2003 mail merge document. I've done this without
any problem before but because each record in this text file has
between four and ten lines each ending with a carriage return
character Word won't let me do it. I keep getting the error 'record n
contained too few data fields'. I'm setting the field delimeter to #
and the record delimeter to $ so surely it shouldn't matter fi each
record contains up to 10 carriage returns.

Any help please.