Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2005

Tip: Looking for answers? Try searching our database.

"Select Table" dialog with no table selectable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alessio.gordini@kpnqwest.it - 17 Aug 2005 17:09 GMT
Hello all,
our automatic mailmerge system has been working for years. Quite
recently, we finally upgraded the system to a Windows 2000 machine with
Office 2003 installed.
Most of the jobs provided to the mailmerge application are still
processed without the slightest problem: the Word and Excel documents
are provided, and the application produces the merged documents to be
sent to the proper recipients.

But a new problem arised, affecting very few (yet annoying) documents:
sometimes Word displays a dialog box titled "Select Table", showing NO
tables (nor sheets, nor anything else: just an empty list is shown).

If we copy the data contained into the Excel document (the first sheet
of it), and paste it into a fresh new document, and then feed it to the
application, it works without showing that annoying and blocking dialog
box.
The documents affected by this problem are provided by our customers,
which cannot explain how (strange) they created these documents.

What is the problem? Why does it happen?
Thank you very much
Regards,
Alessio Gordini
Cindy M  -WordMVP- - 20 Aug 2005 10:41 GMT
Hi Alessio

> But a new problem arised, affecting very few (yet annoying) documents:
> sometimes Word displays a dialog box titled "Select Table", showing NO
> tables (nor sheets, nor anything else: just an empty list is shown).

I take it your macro code is setting up the link to the data source file
(OpenDataSource method)?

This sounds like the macro code is set up for a DDE connection in Word
2000, or earlier, and is being run on Word 2002 or 2003. The default
connection method in Word 2002/2003 is OLE DB, and it uses practically
the same syntax as the DDE connection. (IOW, MS didn't pay the right
kind of attention to backwards compatbility for the OpenDataSource
method).

You probably need to edit your code and add the SubType argument to the
OpenDataSource method. Record a macro to create a DDE connection to this
type of file to get the value you need to pass to the argument.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
alessiogordini@gmail.com - 22 Aug 2005 09:38 GMT
Hi Cindy,
thank you for your answer. I take it you mean that my code (which is a
C++ application working with Word2003) should use explicitly DDE.
Actually, the application currently works with the following Connection
string (the  12th argument passed to the OpenDataSource method):

"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" +
sDataSourcePath + ";Mode=Read;Extended
Properties=\"HDR=YES;IMEX=1;\";Jet OLEDB:Engine Type=35"

while, if I understand what you said, I should replace the use of Jet
OLEDB with the use of DDE. Is it correct?
But I have two questions:
1) why does the current application works with most of the mailmerge
documents submitted to it?
2) why doesn't it work with only some othe documents?

Thank you
Alessio
Cindy M  -WordMVP- - 23 Aug 2005 14:57 GMT
Hi Alessio

Ah, OK, your connection is using OLE DB. Usually, when you see the
message you report, with an OLE DB connection, it usually one of the
other arguments is missing, such as an SQLStatement or a TableName. Why
this would be happening in some instances, and not others, is difficult
to determine without knowing more about how the documents were created,
and what criteria decide which parameters + values are being passed to
the OpenDatasource method.

Given that you can resolve the problem by copying/pasting to a new Excel
Workbook, I'd be inclined to guess that there may be some file damage in
the workbooks you're being sent that's preventing the OLE DB connection
from "seeing" the worksheet.

In your situation, I'd probably

1. test what happens if you try to manually make the connection, in the
Word UI

2. If it works, record that in a macro and compare the code

3. If it doesn't work, see if connecting using ODBC works. If it does,
record that in a macro and adjust your code to use an ODBC connection
method instead of OLE DB. In my experience ODBC is the most reliable,
across all Office versions, with an Access or Excel data source.

> thank you for your answer. I take it you mean that my code (which is a
> C++ application working with Word2003) should use explicitly DDE.
[quoted text clipped - 11 lines]
> documents submitted to it?
> 2) why doesn't it work with only some othe documents?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.