>ox = createobject("word.document") >With OX > mydoc = .Document.Add >EndWith >MyDoc.SaveAs FileName:="C:\Temp.doc"That last line should read:
MyDoc.SaveAs("C:\Temp.doc")There's a good KB article on most everything you need to do to convert VBA to VFP, at http://support.microsoft.com/support/kb/articles/Q160/0/64.asp (#Q160064, if the link doesn't work).
loApp = CreateObject("Word.Application") loAppSearch = loApp.FileSearch>ox = createobject("word.document")
#DEFINE wdPaperLetter 2 ox = createobject("word.document") ox.FilePageSetup.PaperSize = wdPaperLetterThe constant values can be found in the object browser: in Word, go to the VB Editor (Alt-F11), then press F2 to bring up the object browser. Type in the name of the constant, and it'll show a list of all the related constants and their values.