You should check if operation completed successfully
lnBytesWritten = STRTOFILE(lcstring, trim(goapp.cpathshared) + "w2\" + ALLTRIM(lcyear) + '\8655out.xfdf', 0)
IF lnBytesWritten = 0
...
ENDIF
>No. Here's the code.
>
>* Update the xfdf file.
>lccurdir = CURDIR()
>CD trim(goapp.cpathshared) + "w2\" + ALLTRIM(lcyear)
>DELETE file '8655out.xfdf'
>CD &lccurdir
>
>STRTOFILE(lcstring, trim(goapp.cpathshared) + "w2\" + ALLTRIM(lcyear) + '\8655out.xfdf', 0)
>
>lcxfdf = trim(goapp.cpathshared) + "w2\" + ALLTRIM(lcyear) + '\8655out.xfdf'
>
>* Print the populated form.
>SET CONSOLE OFF
>SET HEADINGS OFF
>
>thisform.printpdf(lcxfdf)
>
>* Wait 10 seconds.
> WAIT 'Printing the 8655 form...' window timeout 10
> WAIT CLEAR
>
>SET HEADINGS ON
>SET CONSOLE ON
>
>
>>When you write back to the .xfdf file, do you check if operation completed successfully or failed?
>>
--sb--