>I am trying to do a mailmerge with Word. I tried to specify the data source from VFP (rather than have it specified in the Word template, which was causing other problems). It almost works, but Word comes up asking if this is a 'FoxPro or dBase' file.
>
>My command is:
>loWord.ActiveDocument.Mailmerge.OpenDataSource("c:\mydbf.dbf")
>
>It seems like there must be a way to identify the file as FoxPro programmatically, but I can't see how. Has anyone run across this?
>
>Thanks in advance.
Michael,
I would say don't try it. It could work today but not tomorrow. Since new MDAC 2.1 is introduced support for FP2.x tables are dropped and only VFP databases are supported. Also Word tries exclusive access to tables which might not be suitable for an app. Especially if table has memo fields you get errors (including couldn't find installable ISAM, cannot open datasource etc). In files section (I don't remember what's the last version there) I have uplodaded a mailmerge class lon ago. Check its code to define DSN for using Fox tables.
Instead now what I do is to copy data to clipboard and paste in Word, convert to table and save as datasource. Editmanindocument and set datasource to saved doc. Works fast and w/o suffers from ODBC (I suspect its meaning).
Cetin