Hi Plinio,
At my company we do some reporting using OLE Automation to Word. One technique would be to use the typeText() function of the Word object model to write the data to the file. Also, though, you could set up a template report with bookmarks in it, and then write a program to write data to those bookmarks. Kinda depends on your formatting needs which technique will work.
As far as HOW to do it, you'd start with code similar to this.
Local oWord
oWord = createObject("Word.Application")
oWord.visible = .t.
oWord.Documents.Add
oWord.selection.typeText('This is my Automation')
oWord.displayalerts = .f.
oWord.activeDocument.saveas(saveAsFilepath + fileName,6)
oWord.quit
This, by the way, will save it as an .rtf file. For further info on this technique, you can check the Word help files, or even post a msg in OLE Automation on this page.
Hope this helps.
>Are there some way of sending vfp report output to a Word document. I tried >the frx2word class from UT files, but I'm getting a error (Definition class >SESSION not found).
>I'd like to know if there are other ways of doing this.
>Thanks
Paul A. Busbey
Victoria Insurance