
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Yes, I was wrongly looking at a .doc format file.
I would agree that having the applicition provide a .txt extension is a much
better idea.
However, if that is not possible, try
a. check Word Tools|Options|General|"Confirm conversions at open"
b. connect to the text file
c. in Confirm Data Source, check "Show All"
d. Select Text files (*.txt)
e. if the connection succeeds, save the mail merge main document
f. re-open (manually or programmatically)
There may still be problems if
a. Word thinks it needs to pop up its character encoding dialog or
b. the connection is made programmatically, in whcih case it may be
necessary to provide a Subtype parameter in OpenDataSource
Some background...
While it's true that Word's converters are associated with extensions, the
extensions are primarily used by Word to determine which converters to ask
for a conversion service. Word can ask a converter to try to perform a
conversion regardless of the extension. The first thing the converter does
is to decide whether or not it can convert the file Word is asking about -
in some cases converters may refuse on the grounds that the extension is
wrong but I suspect most of them actually examine some or all of the content
and base their decision on that.
The ODBC and OLEDB methods don't use "Word text converters" and the
association between an ODBC driver or OLEDB provider and an extension is
even hazier. For example, I don't think anything in Windows actually says
"for this file type, use this OLE DB provider" even though some MS
documentation suggests that that is what happens. For ODBC, there is
typically some extension information in the Driver's descriptive name for
those drivers that work with files rather than servers such as SQL Server,
and it's possible that Word looks at those. Otherwise, I suspect Word always
presents OLEDB as an option, then probably tries to use the Jet OLEDB
provider if you choose the OLEDB option. In that case, there is a set of
file extensions that Word or the provider can try to use to determine the
correct "Engine Type". Unfortunately in the case of the Jet "Text Engine",
there really does not seem to be a way to tell OLE DB that an extensionless
file in the specified folder is a "table" in the text "database" specified
by the folder name.
Peter Jamieson
> It doesn't work for me (whether the text file is comma or tab delimited)
> and I already have that registry entry.?
[quoted text clipped - 24 lines]
>>> Any ideas?
>>> Many thanks