Roger,
As others have mentioned, try to qualify the full path for both the ReportForm and the SaveFolder property. I don't know about the internals of Frx2Word, but it's using automation. One thing that bites me often with automation is that the automation server doesn't know anything about the VFP path and default directory. Therefore, the safest is to fully qualify the filenames and make sure they exist.
HTH
>Thanks, just tried it. It return -91 :(
>
>>Roger,
>>Try:
>>
>>lcReportName = 'master1'
>>nSuccess=oF2W.ReportForm(lcReportName)
>>
>>
>>HTH
>>>Hello:
>>>
>>>I would like to use the frx2word class and get the following problem.
>>>
>>>if !used('master')
>>> use master
>>>endif
>>>sele master
>>>
>>>lcReportName = 'master1'
>>>report form &lcReportName prev && This works fine
>>>
>>>oF2W=NEWOBJECT("frx2word","msoexp")
>>>oF2W.SaveFolder="Documents\"
>>>oF2W.DOC_FileName="WordOut1.doc"
>>>
>>>nSuccess=oF2W.ReportForm("lcReportName") && This gives a -2 (No parameter. The name of the report must be passed.)
>>>nSuccess=oF2W.ReportForm("&lcReportName") && This gives a -91 (Error creating DOC file.)
>>>
>>>wait str(nSuccess) window
>>>
>>>
>>>
>>>Any suggestions?
>>>
>>>Thank you.
Daniel