Severus,
When you use the method Sergey referred you to, you do not need to use macro expansion to expand the file name. You can use a named expression:
report form (lcReport) to file (lcFileName) noconsole
>Hi there
>
>I wonder if anyone had this problem before: I am using the following command from a VFP6 program:
>
>REPORT FORM (lcReport) NOCONSOLE TO FILE &lcFileName
>
>The file that gets created is a .ps.pdf file. The only problem is that Adobe automatically opens the created file, so when I am trying to rename it I am getting a "File access is denied" error. It used to work fine, but all of a sudden this happened. Is there some setting in Adobe so that it won't open the file?
>Thanks a lot.
>
>Kind regards,
>Severus
Steve Gibson