Excellent,
loExcel.ActivePrinter = "PDF995 on Ne01:" && "PDF995 ON PDF995PORT"
Now how can I pass a file name to avoid the PDF995 asking for FileName?
>Edgar,
>
>I would start with recording a Macro to see whether the entire approach works with the printer you selected. If OK, then I would go to the VBA Editor, review the code, and translate it to VFP.
>
>
>>Yuri (and anyone),
>>
>>That message still doesn't help identify the reason for the OLE IDispatch exception code 0 from Microsoft Office Excel: Unable to set the ActivePrinter property of the Application class... error generated as indicated below
>>I have verified spelling from current printer array - but still get an error!
>>
>>
>>How can I have excel print the chart to the PDF995 and provide the nameing convention to the file to be created?
>>
>>
>>>objXLsheet.application.ActivePrinter = "Win2PDF on Ne00:"
>>>
>>>See also message #
898535>>>
>>>
>>
>>loExcel = createobject("Excel.Application")
>>loExcel.workbooks.open(GETFILE('xls','Excel To PDF!'))
>>loExcel.Visible = .t.
>>loExcel.ActiveWorkbook.Sheets(2).Activate
>>loExcel.ActivePrinter = "PDF995 on PDF995PORT"
>>loExcel.ActiveWorkbook.Sheets(2).PrintOut
>>loExcel.quit
>>RELEASE loExcel, loWorkbook, loSheet
>>
>>>>What is the proper syntax to set Active Printer?
Edgar L. Bolton, B.S. B.B.A.