OK, the situation is slightly different from what I imagined, in that you
describe opening an existing .doc.
In that case there is one other way you could have made the original
connection, and that's to use the "Excel Converter", which is a Word
external text converter that knows how to read .xls files. IN that case, you
would see the .xls pathname in the SQL security message that pops up when
you open the .doc, rather than (for example) 'Sheet1', and the Edit button
would be available in the "Edit Recipients" dialog box, and you would be led
to a simple editing form if you clicked it.
However, the problem with the Excel converter is that it was last actually
supplied in Office 2000 or 2002, and is no longer provided even with the
"Converter pack" you can download from the MS site. In other words, it's no
longer supported. I'd forgotten that it will let you try and update Excel
data, but again, I think it highly unlikely that it would do that reliably
now. If you want to verify that, you could either do what I have done, which
is to try to use the Immediate Window in the WOrd VBA editor to print the
value of ActiveDocument.MailMerge.DataSource.ConnectString - here, it
crashes Word if the data source is the Converter - or you could try saving
your .doc as a .HTML file, the open the .HTM in Notepad, or Word (but as a
plain tect file) and have a look at the HTML/XML that specifies the
MailMerge connection.
So...
Yes, I do have pretty good back up.
Good.
Yes, I do have pretty good back up. I'm trying to discover
1. what format the XLS file is actually using.
My new guess is that it's some version written by the old converter, and it
may also not be recognisable by Excel itself.
2. how did I possibly convert my file from an Excel format to this new
format (whatever it is), so I can avoid doing that in the future.
One way of looking at it is "don't edit the Excel file from within Word
MailMerge". If you don't have to use the converer to get the data (and
sometimes there are reasons for doing it even though it's obsolete),
re-attach the data source using the current method (you can see
http://tips.pjmsn.me.uk/t0003.htm for a lengthy article about some of the
issues).
3. is it really true that Word could have converted my Excel file to a
new format - but still use the same file extension.
Yes. The Extension is just an extension. The association between a file
extension and the file content is not hardwired. For example, if you happen
to have WordPerfect as well as Word, it also uses the extension ".doc" for
word processing documents. Why wouldn't it - it has been around longer than
Word
4. since Word somehow converted this file to its own format, is there
a way I can convert it back to Excel's format.
I don't know, but I certainly wouldn't want to rely on being able to do
that. If I had to try, I would start writing some VB/VBA ADO code to try to
open the .xls and save it in the current .xls format, but I have no idea
whether or not it would work.
I'm guessing that Word is using an OLD DB provider for ODBC Drivers.
(FWIW I have never seen a situation in which Word actually uses that
provider - it may be possible to get it to do so if you use a .odc or .udl
file with an appropriate connection string if you happened to need to do so.
In the case of file types such as Excel, Word uses the Jet database engine,
and broadly speaking if the file can be accessed via the Jet ODBC driver, it
can also be accessed via the Jet OLE DB provider. There are sometimes
differences in the connection string parameters that can be used, the file
extension names that can be used, and where exactly the driver/provider gets
configuration info. from, )
Peter Jamieson