The file name must be unique and looks like this:
Test_010601-154222.DOC
test_ : is defunied by the user input
010601 is the date
1542222 is seconds
>It can't get an exclusive lock on that DOC file name -or- it's an invalid file name. That's what the code means. Experiment with different Word doc filenames or see if that particular file name already exists and is in use elsewhere or see if you have creating rights on the directory where it's gonna be stored.
>
>Another possibility is spaces in the Doc file name.
>
>>hello I get -91 return code on frx2word:
>>
>>This is the code I use:
>>
>>Report FORM invoice_c5 PREV && This works
>>
>>
>>&& This does not work.
>>
>>oF2W=NEWOBJECT("frx2word","K1Class")
>>oF2W.SaveFolder="c:\motifw\Documents\"
>>oF2W.DOC_FileName=ALLTRIM(lcInvno)+"_InvoiceWord.doc"
>>nSuccess=oF2W.ReportForm("invoice_c5")
>>Messagebox(oF2W.DOC_FileName+"! Created", 48, "Export to Word")
>>wait str(nSuccess) window
>>
>>Any hints? Thank you - Roger
One can acquire everything in solitude but character.
Stendhal (1783-1842)