First of all, you have to take a slightly different approach when connecting
to some types of ODBC data sources. I had forgotten that it was necessary in
this case.
You will either need to make the connection via MS Query (it's on the Tools
menu in the Select Data Source dialog box) or using VBA. MS Query is an
Office/Word SETUP option so you may not have it on your system but you can
install it from the SETUP disks if you want. However, you only need MS Query
to set up the connection, not to use it after that. So you can set it up in
VBA instead, using something like the following, which assumes you have a
User or System DSN called "Visual FoxPro Tables" and that your .dbf is in
c:\mytables:
Sub OpenFoxProTable()
With ActiveDocument.MailMerge
' remove the old connection
.MainDocumentType = wdNotAMergeDocument
.MainDocumentType = wdDirectory
.OpenDataSource _
Name:="", _
connection:="DSN=vVisual FoxPro
Tables;SourceDB=c:\mytables;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;",
_
sqlstatement:="SELECT * FROM sevenday", _
subtype:=wdMergeSubTypeWord2000
End Sub
Turning now to your text,
An existing driver for VFP tables on the 'User DSN' tab.
An existing driver for VFP tables on the 'System DSN' tab.
The first thing to notice is that the things listed under the DSN tabs are
not really "drivers" - they are "Data Source Names", which let you specify a
driver and provide configuration details. So there can be many DSNs for a
single driver. But the key thing is to ensure that the DSN is set up
correctly. If you already had a VFP DSN, I would either delete it and start
again, or leave the old one and create a new one. It could be a file DSN,
but that doesn't help you avoid using MS Query or VBA and since it adds a
complication I would avoid it. In essence, a User DSN is available to the
current user, and a System DSN is available to any user on the system.
As far as I know the only bit of configuration you need to do is to specify
that the Database Type is a Free Table Directory (unless you are using a
..dbc, in which case, use the other option. You don't need to specify a
folder. If you do, you should not have to specify a "SourceDB" in the
connection string unless it is different from the one in the DSN.
I hope that helps you get a bit further.
Peter Jamieson