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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to multiple printers

Status
Not open for further replies.

cstrong

MIS
Dec 18, 2000
22
0
0
GB
Hi all,

We have an application in development here that in some instances needs to print to two printers. Each time a shipment is confirmed, a Shipper Label is printed on the default label printer. If the Shipment is outside of the EEC, we have to print an invoice for the shipper to the laser printer also.

How can I first print the label and then detect the installed laser printer and then output to that?

Ideally, I really don't want the user to have to select the printer. I'd like it to all be done without user intervention.

Thanks in advance,
Clive
 
Make a reference to Windows Script Host Object Model in your project.

'Declaration
Dim wshChangePrinter As New IWshNetwork_Class
Dim oldPrinter as String

oldPrinter = Printer.DeviceName

'Change default to new printer
wshChangePrinter.SetDefaultPrinter ("\\BR-PRINT\HP LJ 4050 PCL6 (Prod Labels)")

'Change to back to original default
wshChangePrinter.SetDefaultPrinter (oldPrinter)


you can also....

Dim x As Printer

'Navigate through the available printers installed on the computer to ensure it is installed.

for each x in printers
x.devicename = ""
next Scott
Programmer Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top