Page 1 of 1

Excel ActivePrinter

Posted: Mon Feb 16, 2015 1:13 pm
by fp
How can I use a special printer (not the default one) with oExcel:Print() ?

I know, that I can get the active printer with oExcel:ActivePrinter

But when I set another printer with

oExcel:ActivePrinter := "Adobe PDF" or other,

I get an error Excel.Application 0000 S_OK: _ACTIVEPRINTER

Is there a solution?

Thanks very much

Re: Excel ActivePrinter

Posted: Mon Feb 16, 2015 3:42 pm
by Enrico Maria Giordano
Frank,

set the new printer as default printer and look at the result of

? oExcel:ActivePrinter

Then use exactly that string as the new printer name.

EMG

Re: Excel ActivePrinter

Posted: Wed Feb 18, 2015 7:48 am
by fp
Thank you, Enrico, it works well !