You're welcome.
>Thank you Sergey.
>This worked great!
>
>
>>>Anyone know how to name the output file name when printing to Acrobat 6.0. from within Foxpro. (Without prompting of course)
>>>
>>>It seems like they got rid of the registry entries that they used to use.
>>
>>There's no PDF Writer included in Acrobat 6.0, only Distiler. To do unattended generation of PDF reports follow this steps:
>>- Right Click on Adobe PDF printer in the Control Panel, select Properties and Printing Preferences. On Adobe PDF Settings tab uncheck: View Adobe PDF results, Prompt for Adobe PDF filename, Do not send fonts to "Adobe PDF'.
>>- Generate PS file and than convert it into PDF as shown below. It could be a little bit slower than with PDF Writer but creates files are smaller.
>>lcPdfFileName = "..."
>>lcPsFileName = FORCEEXT(lcPdfFileName, "PS")
>>lcPdfPrinter = "Adobe PDF"
>>SET PRINTER TO NAME (lcPdfPrinter)
>>Select ReportCursor
>>* Generate PS file
>>Report Form test0 NOCONSOLE TO FILE (lcPsFileName)
>>* Conver PS file into PDF
>>loDist = CREATEOBJECT("pdfDistiller.PDFDistiller.1")
>>lnResult = loDist.FileToPDF(lcPsFileName,lcPdfFileName,"")
>>ERASE (lcPsFileName)
>>ERASE (FORCEEXT(lcPdfFileName, "log"))
>>If lnResult <> 1 Or NOT FILE(lcPDfFileName)
>> * PDF file not created
>> * Do whatever
>>Endif
>>
--sb--