Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Specifying a Print Tray for a Worksheet.
Written by Allen Wyatt (last updated January 9, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Venus has a workbook with twelve worksheets, one for each month. She wants to set it up so that the worksheets for January, April, July, and October print from a different paper tray than the other worksheets.
Unfortunately, there is no way to do this in Excel. Even in a macro there is no way to choose different paper trays. (This has been covered in other issues of ExcelTips.) The only possible solution is rather convoluted. You would need to do the following:
This sounds like a lot of work (it can be), but once it is set up it will work just fine on your system. The problem comes in if you want the same functionality on other systems in your office. The printer definitions are local to the machine on which they are defined, so you would need to define the multiple printers on every system and make sure they were named consistently. The macro would be stored with the workbook, so whoever had access to the workbook could use the macro to do the printing on the desired printers.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8772) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Specifying a Print Tray for a Worksheet.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Excel allows you to print out information in either portrait or landscape orientation, but what if you need both types of ...
Discover MoreNeed to print your worksheet on a non-standard paper size? Excel is rather limited in printing to such papers, and here ...
Discover MoreWhen you press the Print button in Excel, you want your worksheet to go to your printer and produce output as you expect. ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-12-06 07:50:03
Rusty
Can't you go to Page Setup - Options - and select the tray for that sheet? It works for me.
2021-01-09 09:14:53
The task is actually very easy to automate for all Worksheets / Workbooks that require the same setup. The answer is to use a macro, probably best to store it in a separate workbook, such as the Personal.xlsFirst manually setup the printing options for a SINGLE worksheet.Then start the 'Record Macro' option and select the required storage location.From the Ribbon select 'Page Setup'NO NEED TO DO ANYTHING IN THIS DIALOGUE.Click 'OK' or 'Cancel'Stop the macro.Although you have not actually done anything in this macro, all of the current print options are recorded. Below is an example from my computer. ########################################Sub Macro1() Application.PrintCommunication = False With ActiveSheet.PageSetup .PrintTitleRows = "$1:$1" .PrintTitleColumns = "" End With Application.PrintCommunication = True ActiveSheet.PageSetup.PrintArea = "$A:$D" Application.PrintCommunication = False With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "" .CenterFooter = "" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0) .RightMargin = Application.InchesToPoints(0) .TopMargin = Application.InchesToPoints(0.393700787401575) .BottomMargin = Application.InchesToPoints(0.196850393700787) .HeaderMargin = Application.InchesToPoints(0) .FooterMargin = Application.InchesToPoints(0) .PrintHeadings = False .PrintGridlines = True .PrintComments = xlPrintNoComments .CenterHorizontally = True .CenterVertically = False .Orientation = xlPortrait .Draft = False .PaperSize = xlPaperA4 .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 3 .PrintErrors = xlPrintErrorsDisplayed .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = False .ScaleWithDocHeaderFooter = True .AlignMarginsHeaderFooter = False .EvenPage.LeftHeader.Text = "" .EvenPage.CenterHeader.Text = "" .EvenPage.RightHeader.Text = "" .EvenPage.LeftFooter.Text = "" .EvenPage.CenterFooter.Text = "" .EvenPage.RightFooter.Text = "" .FirstPage.LeftHeader.Text = "" .FirstPage.CenterHeader.Text = "" .FirstPage.RightHeader.Text = "" .FirstPage.LeftFooter.Text = "" .FirstPage.CenterFooter.Text = "" .FirstPage.RightFooter.Text = "" End With Application.PrintCommunication = TrueEnd Sub########################################This macro can then be run on any other Worksheet to give an identical printing setup.It could be modified to run through all Worksheets in a Workbook, for example enclose the code above with :-Sub Macro1() Dim WS_Count As Integer Dim I As Integer ' Set WS_Count equal to the number of worksheets in the active workbook. WS_Count = ActiveWorkbook.Worksheets.Count For I = 1 To WS_Count ' INSERT THE CODE HERE. Next IEnd SubA similar approach could be used to select all Workbooks in a folder.The macro above was recorded within Excel 2019, although it should be similar with earlier versions. I do recall that when running Excel 2010 the code included some lines naming my specific printer. You may need to remove these lines, especially if sharing the code with other people.Obviously if you have several alternative printing setups you can repeat the process for each setup.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments