Printing Like a Mail Merge

ScottInTexas

Board Regular
Joined
Oct 28, 2003
Messages
178
One worksheet is set up to fit 10 labels on a sheet. If you run Worksheet.Printout the output will fit the Avery Labels. Sometime we need 100 labels or more, meaning we need a multi-page print job. I want to send all of the pages as one print job instead of 10. Is there a way to do that? All I can see is "Printout" and that prints the print area as a single print job. The code below is what I have now. It generates multiple print jobs as you can see.

Code:
Sub PrintThem(ByVal first As Long, ByVal last As Long)
Dim i As Long
Dim wksht As Worksheet


    Set wksht = Sheets("Label Template")
    For i = first To last
        If i < last Then Range("B4").value = i
        If i + 1 <= last Then wksht.Range("B11").value = i + 1
        If i + 2 <= last Then wksht.Range("B18").value = i + 2
        If i + 3 <= last Then wksht.Range("B25").value = i + 3
        If i + 4 <= last Then wksht.Range("B32:J32").value = i + 4
        Sleep 1000
        wksht.PrintOut Copies:=1, Preview:=False
        DoEvents
        If IsCanceled Then
            Exit For
        End If
        ClearForm
        i = i + 4
    Next
    Set wksht = Nothing
    
End Sub


Thanks for the help.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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