>oWord = Createobject('Word.Application') >oword.setvisible(.T.) >*--lcfilename is a wordmerge doc that is already attached to an excel file >lcfilename = SYS(5)+SYS(2003)+"\templates\mydoc.dot") >oword.Documents.open(lcfilename) && chage to .Documents.add and same issue >*-- Above opens file with merge fields but NO datasource!oword.ActiveDocument.MailMerge.OpenDataSource( tcFileName, ; >0, .F.,,.T.,,,,,,,"Entire Spreadsheet" ) > >*-- opening the file from explorer by double clicking on it opens the file with the datasource! >Try with:
oWord.DisplayAlerts = 0