Figured out my first problem. Just had too many parameters listed. This is what is working now:
lcPath = JUSTPATH(tDataSource)
loActiveDoc.MailMerge.OpenDataSource(tDataSource,,.F.,.F.,.T.,.F.,"","",.F.,"","", ;
"DSN=Foxpro Files - Word;SourceDB="+lcPath+";SourceType=DBF;Exclusive=Yes;Null=No;Deleted=No", "SELECT * FROM "+tDataSource)
Still would like to know how to verify ODBC version and add DSN on the fly if doesn't exist though.
- Randy
Randy Jean
Orion Group Software Engineers