Archive for the ‘Printing’ Category

Save Multiple PDF Files In Shorter Time

OK, no magic involved in this tip. Saving a worksheet as PDF file will take some time, no matter what. You can’t do much about that, but when you are saving many worksheets as PDF files you want this process to go as quickly as possible. I was going to save around 3000 PDF files, [...]

Change the default printer

This example macro shows how to print a selected document to another printer then the default printer. This is done by changing the property Application.ActivePrinter: Sub PrintToAnotherPrinter() Dim strCurrentPrinter As String strCurrentPrinter = Application.ActivePrinter ‘ store the current active printer On Error Resume Next ‘ ignore printing errors Application.ActivePrinter = “microsoft fax on fax:” ‘ [...]

Print out with a delay

Print out with a delay for up to 2 minutes. Now you don’t have to go to your network printer to insert a transparent or any other special sheet, and then return to your computer to start the printing job. Click here to download this file. Updated: 2000-08-08 & 2012-04-11 Requires: XL5 File size: 46 [...]

Copy and Print

This workbook demonstrates how you can print a worksheet for each value in a list from another worksheet. The workbook demonstrates how you can get Excel to repeat a task for each item in a list. Click here to download this file. Updated: 2000-08-08 Requires: XL97 File size: 9 kB

Filter and Print

This workbook demonstrates how you can filter a list for each unique item in a column and print out the filtered list. Useful for those who wish to automate the printing of simple reports. Click here to download this file. Updated: 2000-08-08 Requires: XL97 File size: 12 kB

Print the pages in reverse order

The macro below can be used to print the pages of a worksheet in reverse order. Sub PrintInReverseOrder() Dim TotalPages As Long, p As Long TotalPages = (ActiveSheet.HPageBreaks.Count + 1) * _ (ActiveSheet.VPageBreaks.Count + 1) For p = TotalPages To 1 Step -1 ‘ActiveSheet.PrintOut p, p Debug.Print "Printing page " & p & " of [...]

Print multiple selections on one sheet

If you select multiple cell ranges on one sheet and tries to print out selected cells you will get one sheet for each of the selected areas. The following example macro will print all the selected areas on one sheet, except if the areas are too large to fit in one sheet. Sub PrintSelectedCells() ‘ [...]

Print all workbooks in a folder

With the macros below you can print all workbooks in a selected folder. You have more control with what is printed than you have if you do this from Windows Explorer. Sub PrintAllWorkbooksInFolder(TargetFolder As String, FileFilter As String) ‘ prints all workbooks in a folder that matches the FileFilter ‘ example: PrintAllWorkbooksInFolder "C:\FolderName", "*.xls" ‘ [...]

Select a printer tray before printing

When you print documents from Word with VBA it’s possible to select which printer tray the document is supposed to get a sheet from. In Excel you don’t have the opportunity to set the properties FirstPageTray or OtherPagesTray like you can in Word. It’s possible to create a simple solution by using SendKeys. Here are [...]

Add path- and filenames

If you want to display the filename and path to a workbook in a cell you can use this function : =CELL("filename") This function can also return information about the format, location and content of a given cell. See Help in Excel for more information. You may also use a macro to update the worksheet [...]