Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Steve[_2_] Steve[_2_] is offline
external usenet poster
 
Posts: 2
Default Importing records containing carriage returns

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.

  #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.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Steve[_2_] Steve[_2_] is offline
external usenet poster
 
Posts: 2
Default Importing records containing carriage returns

Thanks for that. I've realised what it is now. Each record can have
a random number of lines in the text file, anything from 10 to 30. So
if the first record in the text file contains 30 records, any
subsequent record with less than that number of records produces the
'record n contained too few data fields' errors.

So the first record in my text file will have to be a dummy record
with the maximum number of possible lines and merging to a new
document means that I will get this error for each record in the text
file. As there might be up to 1,000 record in this file, does anyone
know how to turn this message off?


On 14 Feb, 17:43, "Peter Jamieson"
wrote:
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.- Hide quoted text -


- Show quoted text -



  #4   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

Do you still see this problem if you enclose your multiline fields in double
quotes? And can you do that?

Peter Jamieson

"Steve" wrote in message
ups.com...
Thanks for that. I've realised what it is now. Each record can have
a random number of lines in the text file, anything from 10 to 30. So
if the first record in the text file contains 30 records, any
subsequent record with less than that number of records produces the
'record n contained too few data fields' errors.

So the first record in my text file will have to be a dummy record
with the maximum number of possible lines and merging to a new
document means that I will get this error for each record in the text
file. As there might be up to 1,000 record in this file, does anyone
know how to turn this message off?


On 14 Feb, 17:43, "Peter Jamieson"
wrote:
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.- Hide quoted text -


- Show quoted text -





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you get rid of soft carriage returns? Meredith Microsoft Word Help 1 September 1st 06 09:52 PM
PLEASE can anyone help with my carriage returns?????!!!!! Steve New Users 6 August 8th 05 10:50 AM
Can someone help with my carriage returns??? Steve New Users 2 August 6th 05 11:07 PM
carriage returns [email protected] Formatting Long Documents 2 July 14th 05 04:07 PM
Carriage returns and XML Jorge Microsoft Word Help 1 June 30th 05 05:10 PM


All times are GMT +1. The time now is 10:29 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"