Print To Pdf File

This tutorial will demonstrate how to save / print to a PDF in Excel VBA. This simple procedure will print the ActiveSheet to a PDF. Sub SimplePrintToPDF ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:='demo.pdf', Quality:=xlQualityStandardIncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=True End Sub. Printer – includes all the available printers you can use, including the options to print to a PDF file or send the web page to OneNote. Copies – allows you to configure the number of copies.

This article applies only to novaPDF. If you don't have it yet, you must download it first.

novaPDF (all editions)
Microsoft Excel 2016/2013/2010/2007/2003

We strive to keep our articles as accurate as possible. If you notice any inconsistencies or outdated info please let us know.

If you print to novaPDF the Entire Workbook multiple individual sheets of your Excel workbook, when you try to create a PDF and choose to print the Entire Workbook, each sheet will be saved as a different PDF file. This happens because one (or multiple) sheets in your workbook have a different dpi setting for printing. Because of this, Excel assumes that each individual sheet has to be sent for printing separately, so it will send it in the same way to the PDF printer which will prompt to create a PDF from each sheet.

If you have multiple individual sheets within your Excel workbook, when you try to create a PDF and choose to print the Entire Workbook, each sheet will be saved as a different PDF file. This happens because one (or multiple) sheets in your workbook have a different dpi setting for printing. Because of this, Excel assumes that each individual sheet has to be sent for printing separately, so it will send it in the same way to the PDF printer which will prompt to create a PDF from each sheet.

In order to have all the individual sheets printed within a single PDF file (not multiple PDFs) you need to set the same DPI printing value for all of them.

In order to set the DPI value for each individual page, you have to follow these steps:

  1. Open the Excel workbook
  2. Select the sheet you want to set the DPI for
  3. In Microsoft Excel 2016/2013/2010/2007 go to Page Layout and click on the expand button for the Page Setup dialog (for Microsoft Excel 2003 or earlier go to File->Page Setup)
  4. In the Print Quality section enter the DPI value that you want to have for your document (note that this is the DPI value you will have to set for each individual sheet too) and press OK
  5. novaPDF will ask you where to save the PDF and (if set so) it will open the PDF when it's created. You will have to repeat these steps for each individual sheet in your workbook.

The above method is recommended when you have different printing settings for each page (for instance if you have a Header/Footer set for each page). However, if you have the same printing settings for each sheet in the workbook, you can change the Page Setup options for all sheets at once. Please note that by using this method you will have the same settings for all sheets, including the header/footer.

To set the same Page Setup options for all individual Excel sheets:

  1. Open the Excel workbook
  2. Right-click the tab for any of the sheets you have in your workspace (by default they sheet tabs are named Sheet1, Sheet2, ...)
  3. Choose the Select all Sheets option (which will select all the sheets in your workspace, you can tell they're selected if all the sheet tabs have a white background like an active sheet tab would have)
  4. In Microsoft Excel 2016/2013/2010/2007 go to Page Layout and click on the expand button for the Page Setup dialog (for Microsoft Excel 2003 or earlier go to File->Page Setup). Set the Print Quality to the DPI value you want and press OK so that Excel will record the fact that all pages have the same print settings. It's important to press the OK button even if you don't change anything, because this will 'tell' Excel that all the sheets have the same page setup options.
  5. Click on File then Print and see if you like the way the pages will show when printed to PDF. If you don't have any changes to the printing options select the Print Entire Workbook option under Settings and novaPDF from the Printer name section and click Print to create the PDF file.
  6. novaPDF will ask you where to save the PDF and (if set so) it will open the PDF when it's created.

Video Tutorial:

novaPDF includes a PDF merging (combining) option, so another way to have multiple individual Excel sheets printed to a single PDF would be to use novaPDF's own merge option. This will let you print the first sheet to a PDF document and after that print all the other sheets in that workbook to the same pdf.

You can read more about the PDF merging option here: Merge PDF files with novaPDF

Print To Pdf FileFile
Related articles
Printing an entire Excel workbook to a single PDF file
If you print to novaPDF the Entire Workbook multiple individual sheets of your Excel workbook, when you try to create a PDF and choose to print the Entire Workbook, each sheet will be saved as a different PDF file. This happens because one (or multiple) sheets in your workbook have a different dpi setting for printing. Because of this, Excel assumes that each individual sheet has to be sent for printing separately, so it will send it in the same way to the PDF printer which will prompt to create a PDF from each sheet.
Convert Excel to PDF (Microsoft Excel spreadsheets to PDF)
This tutorial shows how to convert a Microsoft Excel spreadsheet to PDF. novaPDF is a PDF converter that allows creating PDF files from any Windows application that supports printing. If you don’t have novaPDF installed, use the Download page to download and install it.
Merge PDF files with novaPDF
novaPDF is a PDF creator that allows generating PDF files from any Windows application that supports printing. This tutorial shows how to merge PDF files with novaPDF, by adding content before, after, on front of or as a background for the existing content of a PDF file.
Convert Publisher to PDF (Microsoft Publisher presentations to PDF)
Converting publications created with Microsoft Publisher to PDF is easily done by installing a program that does the actual PDF conversion, called a virtual PDF printer. If you don't have a PDF printer installed, use the Download page to download and install novaPDF.
Create PDF from OpenOffice/LibreOffice Calc spreadsheets (ODS)
This tutorial shows how to convert an ODS file format to a PDF by using novaPDF along with some popular spreadsheet applications that have support for opening the format. If you do not have novaPDF installed, use our Download page to download and install it on your computer.