on 04-04-2016 9:21 PM
I need to print to a printer on the network. I added the printer (COWORKERDSKTP) to my printers on my PC - it is not set as the default.
I went to notepad and was able to print a sample to this printer.
Sample Code:
String ls_printer
ls_printer = 'HP LaserJet 1022 on COWORKERDSKTP'
ls_ret = dw_print.modify(datawindow.print.printername = "' + ls_printer +"'")
//ls_ret returns "" appears OK
ls_ret = dw_print.describe("datawindow.printer.printername")
//ls_ret returns "!"
If I add this here:
ls_ret = dw_print.Describe("Datawindow.Printer")
//ls_ret = EPSON WF-2650 - this is my locally connected default printer
dw_print() will print to the EPSON
I just can't seem to get the syntax to print to the network printer.
Hi Rob;
1) You can always let the user choose by calling the PrintSetup ( ) method.
2) For targeting the print output, I would recommend using the PrintGetPrinter () and PrintSetPrinter () methods. The 1st command to get the current default printer and the 2nd command to direct the print output. Once everything is printed, you can again use the PrintSetPrinter () method to restore the previous default printer.
Tip: You can use the PrintGetPrinters () method to get a list of all the user's printers assigned to their workstation.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.