oword = CREATEOBJECT("word.application") oword.Documents.Add() oword.ActiveDocument.Range.Bold=.t. oword.Visible = .t.>I know this is a stupid question but then again most of mine are.
>PUBLIC oWord,oselection,x > x=1 > oWord = CREATEOBJECT("Word.Basic") >* oselection=oword.selection > WITH oWord >* .AppShow && Makes Wor Visible > .FileNewDefault && Opens up blank Word document > > > .Insert(DTOC(DATE())+" "+TIME()) > && The above line shows the record number. > .InsertPara > .InsertPara > > .Insert(ALLTRIM(m.company_name)) && Field in the table. > .InsertPara > .Insert(m.company_address) > .InsertPara > .Insert(ALLTRIM(m.company_city)+", "+m.company_st+" "+m.company_zip) > .InsertPara > .InsertPara > .Insert("Separation Information Report") > .InsertPara > .Insert(ALLTRIM(cr_empl.first)+" "+ALLTRIM(cr_empl.lname)) > .InsertPara > .INSERT("SSN "+SUBSTR(cr_empl.empno,1,3)+'-'+SUBSTR(cr_empl.empno,4,2)+'-'+SUBSTR(cr_empl.empno,6,4)) > .InsertPara > .InsertPara > .Insert("Assignment History") > .InsertPara > .Insert(massignment) > .Insertpagebreak > .Insert("Contact History") > .InsertPara > .Insert(mreportcontact) >* .Insertpagebreak > .Insert("General Employee Notes") > .Insertpara > .Insert(cr_empl.interview_comm) > > .FileSaveAs(mfile) > PRIVATE manswer > IF x=1 > manswer=MESSAGEBOX('Would you like to print a copy of this report?',4+32) && mfile declared in usexpress > ENDIF > IF manswer=6 AND x=1 > .fileprint > x=x+1 > ENDIF > > .AppClose > ENDWITH