> Does anyone know how to define what appears in the files of Type list.
I do not thnk there is any way to change this.
I'm not particularly familiar with FoxPro any more but
Are you trying to open a .dbc? If so, the following may help.
I do not think you will be able to open a .dbc using ODBC by selecting the
.odc in this dialog box. I suspect the problem is that there is too much
source-specific hardcoding in the component that connects to these files.
If you are actually getting data from a .dbf file, you should be able to
select the .dbf directly in the usual way, selecting the appropriate ODBC
driver in the Confirmation dialog.
Otherwise, if you need to However, you can connect programmatically using
OpenDataSource, e.g. using a User/System DSN called vfpdbc, a .dbc at
c:\fp\fp.dbc, fetching data from a table called t, you can use
ActiveDocument.MailMerge.OpenDataSource _
Name:="", _
connection:="DSN=vfpbc;SourceType=DBC;SourceDB=C:\fp\fp.dbc", _
sqlstatement:="SELECT * FROM t"
You do not seem to need the Subtype:=wdMergeSubtypeWord2000 that is usually
needed when Name:=""
As long as you have MS Query on your system, you can connect to the .dbc
using that approach (in the Select Data Source dialog, open the Tools menu
at the top right and use the MS Query option). However, in that case you may
have to create the ODBC DSN so that it points to a specific .dbc, or you
could perhaps create a File DSN for each .dbc and use that.
Finally, if you have the VFP OLEDB provider installed, you could consider
connecting using that. Perhaps the easiest way is to create a .udl file
using the Microsoft Data Link editor - Word 2003 recognises that as a data
source file type so you do not even need to check
Tools|Options|General|Confirm conversion at open. If you leave the database
name blank, you should be prompted for it; If you fill it in, you should be
taken straight to the table selection dialog. You can probably use the .odc
approach instead.
FWIW, this sort of stuff seems to work a lot more smoothly in Word 2003 than
2002, at least in part because of some fixes, but the point is that if you
also need to use Word 2002 you may have more difficulty.

Signature
Peter Jamieson
> I have the foxpro ODBC driver version 6.1.8629.1 loaded on my machine with
> word version 2003. I am trying to use mail merge to merge with foxpro data
[quoted text clipped - 14 lines]
> Thank you in anticipation, I have gone through all of MSDN to no avail and I
> am now stuck
susan crookshank - 13 Oct 2004 15:05 GMT
I am trying to connect to a dbf fine not the database. I have aslo tried with
the command method you have described but word crashes out as soon as t tries
to connect to the file. Unfortunately with no error messages to give us a
clue what the problem is.
Does anyonw know how to unistall versions of mdac as it seems that may be
where the problem is.
> > Does anyone know how to define what appears in the files of Type list.
>
[quoted text clipped - 62 lines]
> I
> > am now stuck
Peter Jamieson - 13 Oct 2004 23:20 GMT
Have you tried the OLEDB approach I described? Does Word crash no matter
which approach you use? Does it crash even with a newly created test
database/data file?
> Does anyonw know how to unistall versions of mdac as it seems that may be
> where the problem is.
I don't know - I suspect the best you can do is re-install or install a
later version.

Signature
Peter Jamieson
> I am trying to connect to a dbf fine not the database. I have aslo tried with
> the command method you have described but word crashes out as soon as t tries
[quoted text clipped - 70 lines]
> > I
> > > am now stuck
susan crookshank - 14 Oct 2004 09:59 GMT
Word crashes whatever method tried. It has been solved now but only by
uninstalling word 2003 and installing word 2000. This makes me concerned that
word 2003 has a problem with this odbc as mentioned in another thread.
> Have you tried the OLEDB approach I described? Does Word crash no matter
> which approach you use? Does it crash even with a newly created test
[quoted text clipped - 107 lines]
> > > I
> > > > am now stuck
Peter Jamieson - 14 Oct 2004 10:47 GMT
> Unfortunately with no error messages to give us a
> clue what the problem is.
Yes, the only way I know to generate any debug information in this situation
is to switch on ODBC logging in the ODBC administrator. That gives you a log
of all the ODBC calls made, which may be hard to intepret. Probably worth a
look in case something really obvious shows up.
Would it be possible to try connecting to a .dbc? Or does Word crash no
matter what you do?
Does the problem occur even with a newly created test .dbf?
One thing I am unsure of in FoxPro these days is whether dbf have the same
structure regardless of whether they are associated with a .dbc or not -
i.e., if they are associated with a .dbc, maybe you /have/ to go the .dbc
route.
> Does anyonw know how to unistall versions of mdac as it seems that may be
> where the problem is.
I don't know - you may need to ask in another group - but as far as I know
mdac is supplied as part of more recent versions of Windows so you may not
be able to uninstall it. I suspect the best you will manage is to reinstall
the version you have, or install a later version.

Signature
Peter Jamieson
> I am trying to connect to a dbf fine not the database. I have aslo tried with
> the command method you have described but word crashes out as soon as t tries
[quoted text clipped - 70 lines]
> > I
> > > am now stuck
susan crookshank - 14 Oct 2004 11:29 GMT
The dbf is not attached to a dbc as I have always found that more unreliable.
I have been fighting with ODBC and word for years as I have an application
tht I sell written in foxpro that then controls wrod to produce mail merge
letters. The MDAC 2.5 installaion helpded greatly I am just a bit worried
that now they have taken the foxpr bit out of recent MDAC installaions it
will fall aprat soon again, just do not knwo when.
> > Unfortunately with no error messages to give us a
> > clue what the problem is.
[quoted text clipped - 123 lines]
> > > I
> > > > am now stuck
Peter Jamieson - 14 Oct 2004 12:10 GMT
Understood. As far as I can tell, most of MS's data access attention is
given to ADO.NET (no use to Word mailmerge users!) and SQL Server these
days, but assuming the OLEDB provider is still supported and you can use it
in your application it could be worth pursuing this problem directly with
MS.
Incidentally, to go back to your original question about the list of file
types, I did come across an article about using FoxPro with earlier Word
versions which claims that you need an Installable ISAM for the extension to
appear in the list of file types. I don't know if that is actually correct,
and it's not relevant since there isn't an IISAM for FoxPro and AFAIK there
is no documentation on how to build your own IISAM even if you wanted to,
but the article is at
http://support.microsoft.com/default.aspx?scid=kb;en-us;277772

Signature
Peter Jamieson
> The dbf is not attached to a dbc as I have always found that more unreliable.
> I have been fighting with ODBC and word for years as I have an application
[quoted text clipped - 130 lines]
> > > > I
> > > > > am now stuck