Print Macro spooling multiple quantities

newsam

New Member
Joined
Dec 7, 2010
Messages
3
I am printing from an Excel macro to a Zebra Z4M label printer and I'm having a tough time getting excel to spool the print jobs as more than qty 1. For instance, if I wanted 50 labels, it wants to spool 50 jobs as qty 1 label. This takes the printer much longer because it pauses between each job and makes a job that should take 10 seconds take about a minute. Any ideas?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
OK here is the code I've got. I'm pulling the copies quantity from a cell in the Excel file.

Code:
Sub print_pid()
'
' print_pid Macro
'
'
    DefaultPrinter = Application.ActivePrinter
    Sheets("Sheet2").Select
    Application.ActivePrinter = _
        "[URL="file://d8w5mhf1-0208/Zebra"]\\D8W5MHF1-0208\Zebra[/URL]  S4M ZPL (200dpi) - Amy on Ne06:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=Sheets("Print PID").Range("D1").Value
    Sheets("Print PID").Select
    Application.ActivePrinter = DefaultPrinter
End Sub
 
Upvote 0
I've printed to a Zebra printer before, although not from Excel, and I recall that we had some similar problems. (Please note that the following is from memory, and may not apply to the specific Zebra printer you're using.)
If I recall correctly, to prevent each label from being sent as an individual print job, you have to include the number of copies with a command language code that gets sent to the printer.
Inour system, the final string that gets sent to the printer includes the quantity. There are lots of commands inside brackets, which get mangled a bit by the forum editor, but I've tried to manage it below by adding spaces around all of the brackets. Delete all the spaces, and you will have the code string that sends quantity 3 to our Zebra printer:
Code:
<STX><SI>< STX > < RS > 3 < ETB > < ETX >
<ETB><ETX>
Hope you can use that to solve your problem,
Cindy
 
Upvote 0
Thanks for all the advice, but I figured out that it was something as minor as unchecking the "Collate" box on the print screen. I just modified the macro and it works perfect now.


Code:
ActiveWindow.SelectedSheets.PrintOut Copies:=Sheets("Print PID").Range("D1").Value, Collate:=False
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,827
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top