Written by Allen Wyatt (last updated October 22, 2022)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021
David has a document that contains just under 30 pages. When he prints the document, he would like odd pages to be printed from tray 1 of the printer and even pages to be printed from tray 2. He wonders if there is a way to specify that certain pages should be printed from certain paper trays all within the same print job? (If he performs separate print jobs, then the pages are not in the correct collation. If he can print in a single print job, then they are all collated correctly.)
There is no inherent capability to do this within Word, at least not as David has envisioned. Word allows you to modify how print jobs are handled, with the parameters allowed by your printer driver. For most printer drivers you can specify which paper tray to use for your job. You can also specify whether Word should print even or odd pages. When you combine the two settings, you could specify that even pages be printed from one tray, and then do a second job to specify that odd pages be printed from the other tray.
That is not what David desires, however. He would like a way to print all pages at once and have the pages alternate between two trays. One could envision a similar need where you want every third page or every fifth page to print from a different print tray. Word does not allow this level of control from within the program, however.
Theoretically you could do your printing using a macro. The following example will print alternating pages of your document to two different printer trays:
Sub PrintUsingTwoTrays() Dim sUseTrays(1) As String Dim sTray As String Dim iPgs As Integer Dim J As Integer ' Set up paper trays to use sUseTrays(0) = "Tray 2" ' Tray for even pages sUseTrays(1) = "Tray 1" ' Tray for odd pages ' Get total pages in document iPgs = Selection.Information(wdNumberOfPagesInDocument) ' Save current tray setting sTray = Options.DefaultTray For J = 1 To iPgs Options.DefaultTray = sUseTrays(J Mod 2) ActiveDocument.PrintOut Range:=wdPrintFromTo, _ From:=Trim(Str(J)), To:=Trim(Str(J)) Next J ' Restore original tray setting Options.DefaultTray = sTray End Sub
The key to using the macro is to make sure that you set the sUseTrays(0) and sUseTrays(1) variables to be the names of your two printer trays. These names may vary from printer driver to printer driver, so if the macro doesn't work for you, you'll want to check the exact names of your paper trays as understood by Word. Do this by displaying the Word Options dialog box, clicking Advanced at the left side of the dialog box, and then scrolling down to the Print section. There you'll see a Default Tray drop-down list that shows all the tray names defined within your printer driver.
You should also note that this approach works great for alternating between two paper trays. If you want to have the macro print to different trays for every 3 or every 5 pages, then you'll need to modify the use of the sUseTrays array and modify how the DefaultTray property is set based on page number.
The macro approach ends up doing a print job for individual pages within your document. Thus, in David's case, if he has a document with 27 pages, then the macro generates 27 print jobs, one for each page in the document. This means that printing using the macro will be slower than if you print a single print job, due to the overhead introduced by Word, Windows, and your printer for each print job. It also means that if you are printing to a shared printer, it is theoretically possible for some else's print job to be handled in the middle of your 27 print jobs.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10372) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021.
Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!
One way to use heading styles is to create a story outline. When it comes time to print the story, though, you may not ...
Discover MoreWhen dealing with determined users, it is virtually impossible to prevent information in your document from being ...
Discover MoreNon-printing characters are very handy to view when editing a document. But what if you want those characters to no ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-11-14 07:33:07
Paul Counce
I'm a longtime WordTips lurker. Thanks so much for all you do!This macro is *close* to what I need. I need a similar macro that will print page 1 to one tray, and then all of the remaining pages from 2 on to another tray. I'm just not skilled enough in VBA to figure this out. Plus my workplace would frown on me trying to get too manipulative with the locked-down network.
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments