How to create a Print to PDF button in Microsoft Excel on Windows 11

While you can use Microsoft Excel to create spreadsheets, not everyone will have the same version of Workplace installed. This becomes critical when using built-in functions to analyze data in spreadsheets. So it’s a good idea to convert an Excel spreadsheet into a PDF file that anyone can open on a variety of devices.

Since you may not be aware of which version of Microsoft Excel your colleagues, clients, or students may be using, you can save your spreadsheet as a PDF. And if you have to do it a lot, you can create a Save As or Print to PDF button to get the spreadsheet directly in PDF format. Here is how to create a Print to PDF button in Microsoft Excel on Windows 11.


The Quick Access Toolbar available for Microsoft Workplace apps allows you to access actions and commands such as Save , Home , Save As, Send File, and more. It can also be used to enable the Print to PDF functionality in Microsoft Excel. You can print any PDF file. However, you will need a PDF reader software such as Adobe Acrobat Reader to properly open and layout the PDF file.

Here’s how to enable the function.

Step 1: Click the Start icon on the taskbar to open the Start menu , type Microsoft Excel in the search box, and hit Enter .

Also Read:   Why does Bluetooth speaker keep dropping out on Windows 11

Step 2: Open the Excel workbook where you want to enable this functionality.

To Step 3: Click on File from the top left corner.

Step 4: Select Options in the bottom left corner.

Step 5: Click on the Quick Access Toolbar in the Excel Options window .

To Step 6: Click on the Popular Commands drop-down menu.

Step 7: Select All Commands.

Step 8: Scroll down and select Publish as PDF or XPS.

To Step 9: Click the Add button to copy the command.

Step 10: Click Save on the bottom right-hand side to confirm.

After closing the window, you will see the Print to PDF icon on the Quick Access Toolbar.

Step 11: Click the icon after selecting the cells you want to print as a PDF.

To Step 12 : Enter a file name , select a location to save your PDF, and click Publish .

The Excel file will now open as a PDF in Adobe Acrobat Reader or whatever software you have installed on your Windows 11 computer to open PDF files. You can now print this file.

You can also read our post if the Quick Access Toolbar is not working in Excel on your computer.

Create a Print to PDF button using Macro commands in Microsoft Excel

You can also create a PDF Macro command button in a Microsoft Excel sheet to quickly send to print as a PDF. The macro command button lets you automate actions with a single click. This step is advanced and requires you to enable the Developer tab in Microsoft Excel. Here’s how.

Also Read:   How to Mirror Android to Windows 11 PC

Step 1: Click the Start icon on the taskbar to open the Start menu , type Microsoft Excel in the search box, and hit Enter .

Step 2: Open the Excel workbook for which you want to enable this functionality.

To Step 3: Click on File from the top left corner.

Step 4: Select Options in the bottom left corner.

Step 5: Under Customize Ribbon , scroll down to the bottom and enable the Developer tab. Then, click Save in the bottom right corner.

After enabling the Developer tab in the ribbon, here’s how to create a button macro for printing to PDF.

Step 1: Click on the Developer tab at the top.

Step 2: Click Insert .

To step 3: Select the command button (ActiveX control) icon.

This will insert a command button inside your Excel sheet.

Step 4: Right-click the command button and select Properties .

Step 5: Edit the caption – the name of your macro’s command button. Call it something as easy as Print to PDF .

To Step 6: Close the Properties window , right-click the command button again, and select View Icon.

You will now see the Microsoft Visible Primary window.

Step 7: Copy and paste the command into the Visible Primary window.

Also Read:   How to fix mouse lag on Windows 10

Dim PrintFile As String PrintFile = Utility.DefaultFilePath & "" & _ ActiveWorkbook.Identify & ".pdf" Sheets("Sheet1").Choose ActiveSheet.PageSetup.PrintArea = "B7:E17" ActiveSheet.ExportAsFixedFormat Kind:=xlTypePDF, _ Filename:=PrintFile, High quality:=xlQualityStandard, _ IncludeDocProperties:=True, IgnorePrintAreas:=False, _ OpenAfterPublish:=True 

Note that the VBA Sheets.Choose statement contains the number of the sheet that you need to print. You also need to select the print area by entering the specified cell numbers.

Step 8 : Press Management + S to save the code.

To Step 9: Close the Visible Primary window and click the macro command button to print Excel as a PDF.

If the command button isn’t working, here’s how to enable macro button permissions in Microsoft Excel.

Step 1 : In the same Excel file , click on File in the upper left corner.

Step 2 : Click on Options in the lower left corner.

To Step 3: Select Trust Center.

Step 4 : Click on Trust Center Settings.

Step 5: Select Macro Settings from the left menu.

To Step 6: Click the check box next to Enable VBA Macros, Enable Excel 4.0 Macros , and Trust access to the VBA project object model.

Close the window, and the macro button will now work.

Print the EXCEL file to a PDF file

These steps will help you create a Print to PDF button in Microsoft Excel. You can also read our post to learn how to insert a PDF document into your Excel sheet on Windows 11.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button