If you regularly save Excel workbooks as PDFs, a custom Print to PDF button can save time and reduce repetitive menu clicks. On Windows 11, you can add a one-click shortcut in Excel by using the Quick Access Toolbar and, if needed, a small macro-based workaround for more control.
This guide shows the simplest way to set up a PDF-printing button in Excel, along with a reliable alternative if you want the button to export a file automatically instead of opening the print dialog every time.
The simplest way: add the built-in Print command to the Quick Access Toolbar
Excel already includes a Print command that works with the Microsoft Print to PDF printer in Windows 11. Adding that command to the Quick Access Toolbar gives you a much faster way to open printing without hunting through the File menu.
- Open Microsoft Excel.
- Click the small drop-down arrow on the Quick Access Toolbar at the top-left corner of the window.
- Choose More Commands.
- In the Choose commands from box, select All Commands or Commands Not in the Ribbon.
- Scroll down and select Print Preview and Print or simply Print, depending on the version of Excel you are using.
- Click Add, then click OK.
You should now see a Print button on the Quick Access Toolbar. When you click it, Excel opens the print view, where you can choose Microsoft Print to PDF as the printer.
If you want a true one-click PDF export button
If your goal is to click a button and immediately create a PDF file, a macro is the better option. This method can export the active worksheet or workbook directly to a PDF without opening the full print interface.
- Press Alt + F11 to open the Visual Basic for Applications editor.
- In the VBA editor, click Insert, then Module.
- Paste a macro such as the following into the module window: Sub ExportActiveSheetToPDF() Dim filePath As String filePath = ThisWorkbook.Path & "\" & Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) & ".pdf" ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=filePath, Quality:=xlQualityStandard End Sub
- Close the VBA editor.
- Return to Excel and save the file as a macro-enabled workbook if needed.
- Add the macro to a button by using the Developer tab or by placing it on the Quick Access Toolbar.
Add the macro to a button in Excel
Once the macro exists, you can attach it to a button so it behaves like a custom Print to PDF shortcut.
- Right-click the Quick Access Toolbar and choose Customize Quick Access Toolbar.
- In the Choose commands from box, select Macros.
- Select the macro you created.
- Click Add, then click OK.
If you prefer an on-sheet button, you can also insert a Shape, right-click it, choose Assign Macro, and select your PDF export macro.
Which method should you use?
- Use the built-in Print command if you still want to choose printer settings or adjust page layout each time.
- Use a macro if you want the fastest possible PDF export with fewer clicks.
- Use the Quick Access Toolbar method if you want a safe, no-code shortcut that works well for everyday printing.
Things to check if the button does not work
- Make sure Microsoft Print to PDF is enabled in Windows 11 Printers & scanners settings.
- Check that the workbook is saved before using a macro that relies on ThisWorkbook.Path.
- If the macro button appears but does nothing, confirm that macros are enabled for that workbook.
- If the PDF output looks cut off, review Page Layout settings such as orientation, margins, and scaling.
- If Excel refuses to export, confirm that the file is not open in a protected or restricted mode.
A better workflow for frequent PDF exports
If you create PDFs from Excel often, the best setup is usually a combination of a clean print layout and a custom shortcut. Set your page size, margins, and scaling once, then use the toolbar button or macro each time you need a PDF. That gives you both speed and consistent output.