#include "wdconst.h" Select cust_id, company,contact,country ; from (_samples+'data\customer') ; where country = 'USA' ; into Cursor Tempreport lcTemp = FORCEPATH(Sys(2015)+'.tmp',SYS(2023)) lcSourceDoc = FORCEPATH('Source.txt',SYS(2023)) Copy To (lcTemp) Type Delimited With "" With Tab lcHeader = chrtran('CustomerID,CompanyName,ContactName,Country',',',CHR(9)) Strtofile(m.lcHeader+Chr(13)+Chr(10)+; Filetostr(m.lcTemp),m.lcSourceDoc) Erase (m.lcTemp) *** set the LOCALEID to English nlLocaleId=Sys(3004) && Save local id =Sys(3006,1033) && We will be sending instructions in English *** set the LOCALEID to English Local oWordDocument, llToPrinter, lcTempDataDoc oWord=Createobject("word.application") && Create word object With oWord .documents.Add && New file or open a template With .Activedocument.Mailmerge .OpenDataSource(m.lcSourceDoc) && Set file as data source for mailmerge .EditMainDocument && Activate the main document Endwith .Application.Selection.TypeText("Dear,"+Chr(13)) With .Application.Selection.Font .Name = 'Times New Roman' .Italic = .T. .Size = 14 Endwith .Activedocument.Mailmerge.Fields.Add(.Application.Selection.Range, 'ContactName') .Application.Selection.TypeText(Chr(13)) .Activedocument.Mailmerge.Fields.Add(.Application.Selection.Range, 'CompanyName') .Application.Selection.TypeText(", ") .Activedocument.Mailmerge.Fields.Add(.Application.Selection.Range, 'Country') With .Application.Selection.Font .Italic = .F. .Name = 'Arial' .Size = 10 Endwith .Application.Selection.TypeText(Chr(13)+"Blah blah") .Visible = .T. && Show word app .Activate && Make it the active foreground app Endwith **** Set the LocaleId to the previous value =Sys(3006,Val(nlLocaleId))Cetin