Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Chart to PDF OLE err
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01060492
Message ID:
01061155
Views:
22
This message has been marked as a message which has helped to the initial question of the thread.
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" && <<<------ Error Here!
>loExcel.ActiveWorkbook.Sheets(2).PrintOut
>loExcel.quit
>RELEASE loExcel, loWorkbook, loSheet
>
>>>What is the proper syntax to set Active Printer?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform