>#Define MYDBC fullpath("testdata.DBC") >#Define wdSendToEmail 2 >#Define wdSendToFax 3 >#Define wdSendToNewDocument 0 >#Define wdSendToPrinter 1 >cSQLStatement1 = "SELECT * FROM employee where title like [Sales%]" >cSQLStatement2 = "" > >* Be carefull with where clause - where title = [Sales] fails >* for ODBC uses ANSI SQL (exact match) >* Two strings for first is limited to 255 chars > >oWordDocument=createobject("word.application") && Create word object >With oWordDocument > .Documents.Add(sys(5)+curdir()+'mytemplate.dot') && Use a predefined template > With .ActiveDocument.MailMerge > .OpenDataSource(,,,.T.,,,,,,,, ; > "DSN=Visual FoxPro Database;SourceDB="+MYDBC+; > ";SourceType=DBC;Exclusive=No;",; > cSQLStatement1, cSQLStatement2) && Open data source - Link to source > .Destination = wdSendToNewDocument > .Execute > Endwith > .Visible = .t. >Endwith >I just need to understand how will the store will be done in regards to two fields for example.