OK, this is not very familiar ground for me, but...
When the Select table dialog pops up, note the table name (let's say it is
'xyz')
Then try:
WordDoc.MailMerge.OpenDataSource( _
Name:="C:\MailMerge\Forms\CANC_LETTER.html", _
SQLStatement:="SELECT * FROM `abc`", _
SubType:=Word.WdMergeSubType.wdMergeSubTypeAccess)
I leave you to get the syntax right, but you may find that you can use [abc]
instead of `abc`
This suggests that Word 2002 connects by default using the Jet OLE DB driver
and its HTML engine, and that even if there is only one table in the HTML
file, you will still be prompted if you do not supply the SQL that selects
the table - I think that's different from the way Word 2003 does it, but
there may be some other difference I am not aware of. It surprises me that
using the wdMergeSubTypeWord2000 option does not work, but there it is.
There are some rules about how the OLE DB provider determines the names of
tables inside an HTML document - I'll try to dig them out.
Peter Jamieson