header record delimiters dialog box

E

EGS3

Is there any way to specify the field delimiter and the
record delimiter so that the header record delimiters
dialog box does not pop up?

Thanks;

Ed
 
P

Peter Jamieson

Unfortunately not, especially assuming you want to use the layout you
mentioned in your recent message.

Generally speaking, probably the safest delimiters to use are comma or <tab>
for the field delimiter (and even <tab> can have its problems) and
"paragraph mark" for the record delimiter. If your data includes either
delimiter, you have to wrap the data item in double quotes.

As far as I know, the only way to specify a particular field delimiter in a
text file in a way that will prevent Word asking is to ensure that Word uses
ODBC to open the file (e.g. using an OpenDataSource call in VBA), and
specify the field delimiter in a SCHEMA.INI file in the same folder as the
text file. However
a. you can only specify the field delimiter. As far as I know ODBC always
expects the record delimiter to be a line end (CRLF)
b. using ODBC may reduce the maximum number of fields to 255

You haven't stated the reasons for wanting to do things the way you are
doing them, but assuming it is vital to start with that format, all I can
suggest is that if necessary you consider
a. preprocessing the file into a format that Word will recognise without
popping up boxes (e..g tab field delimiters, CRLF record delimiters)
b. using .dat extension if you are using a plain text file (this helps
avoid use of ODBC
c. "rolling your own" merge to read the data directly.
 
C

Cindy M -WordMVP-

Hi Egs3,
Is there any way to specify the field delimiter and the
record delimiter so that the header record delimiters
dialog box does not pop up?
Just a supplement to Peter's response:

This dialog box will pop up if your data source contains
only one record, in addition to the field names.

It will also pop up if you're using a "header source".

In this last case, copy the field names in the "header
source" file and paste them below. The repeated field names
will act as a confirmation to Word that it's guessing the
correct field separator.

For the first case, set up with a header source, as
described above.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top