It sounds to me as if you are seeing the ODBC connection dialog box when
you should be seeing the OLE DB dialog box. When Word tries to connect
to an Excel data source, it tries OLE DB first, but if it cannot open
the Excel workbook using OLE DB, it tries ODBC, which is an older
method. (Then if that does not work, it tries DDE, which is even older).
The ODBC dialog box behaves in the way you describe - it does not
necessarily select the file name you specified (in fact, if the path
name is long, you may not be able to see the entire path name at all).
If you can select the correct file, you should be able to see all the
worksheets and named ranges by clicking Options and selecting all four
options.
However, the fact that you are seeing the ODBC dialog at all is a sign
that there could be something wrong with your workbook, are at the very
least, something that OLE DB cannot "understand." For example, if the
workbook is password-protected, OLE DB cannot open it. But ODBC cannot
do so either. In that particular case you would have either to remove
the protection, or use DDE to open the workbook.
If you need to do that, you can either wait until ODBC connection has
failed (in which case you should see the DDE dialog) or
- check Word Office Button->Word Options->Advanced->General->"Confirm
File format conversion on open".
- go through the connection process again. You should see a dialog box
titled "Confirm Data Source". It will probably just show "OLE DB
Database Files".
- click "Show all"
- scroll down the list and select "MS Excel Worksheets via DDE (*.xls)"
- click OK
Excel should open (if it is not already open) and open the workbook (if
necessary), at which point you will see any password dialog.
NB you can only get data from the first worksheet in the workbbook with
DDE, or from named ranges in that sheet. Further, you don't get Unicode
data (same with ODBC).
If you do not know a reason why your workbook would not open with OLEDB,
you could consider reconstructing it. Although it seems that working
with lists/databases within Excel (aplying filters/grouping) can
sometimes cause this kind of problem, I have never got to the bottom of
what causes problems for OLE DB.
Peter Jamieson
http://tips.pjmsn.me.uk