Excel ActivePrinter

Post Reply
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Excel ActivePrinter

Post 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
Frank-Peter
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Excel ActivePrinter

Post 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
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Excel ActivePrinter

Post by fp »

Thank you, Enrico, it works well !
Frank-Peter
Post Reply