Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetUp Printer at runtime

Status
Not open for further replies.

RobertoMexicali

Programmer
May 2, 2003
39
MX
Is anybody knows how can i recover the original setup printer after i change it?

i'm doing this:

the default printer is N printer, my user has to print a document in laser quality so i change it and start my report procedure:

PRINTERDIALOG('Choose Printer')
PrintConstancias2004(CONS:NUMDOCTO,CONS:FECHA_IMPRE)

what i need is that when i get back from the report, the user can change back to the default printer without the printer dialog

thanks
 
Hi,

Have you tried to use Printer{PROPPRint:Device} to read or set the printer?

OldPrinter String(50)
OldPrinter = Printer{PROPPRint:Device}
PRINTERDIALOG('Choose Printer')
PrintConstancias2004(CONS:NUMDOCTO,CONS:FECHA_IMPRE)
Printer{PROPPRint:Device} = OldPrinter

You will need to add INCLUDE('PRNPROP.CLW') to the project in the global includes

Valery.
 
Thanks Valery your help was very usefull, i used your tip and is working perfectly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top