Fix Excel for Mac Printing to PDF Instead of the Default Printer
Question details
Identify why an Excel for Mac VBA procedure prints to a PDF file instead of the intended printer after a PDF export.

- Product
- Microsoft Excel for Mac
- Device & OS
- macOS
- Scenario
- A VBA procedure exports a worksheet to PDF and then attempts to print it, particularly in Excel 2016 or 2019 for Mac.
- Observed behavior
- The print operation produces a PDF file instead of sending the worksheet to the expected default printer.
Confirm that the intended printer is available in macOS System Settings or System Preferences under Printers & Scanners. Open the workbook and identify the VBA procedure that exports the PDF and calls PrintOut.
Check and restore Excel's active printer around the PDF export
Use this diagnostic approach to find out whether the macro or a script changes the selected printer before printing.
Exporting a worksheet to PDF or combining PDF files should not normally require selecting a PDF printer. The cause is not established, so compare the printer settings before and after each operation.
Open System Settings or System Preferences > Printers & Scanners, and check the Default printer setting. Select the intended printer if necessary.
In Excel, open Tools > Macro > Visual Basic Editor and find the export and print procedure. Look for assignments to Application.ActivePrinter and any AppleScript or MacScript commands that change the macOS default printer.
In the VBA editor, add Debug.Print Application.ActivePrinter immediately before and after the PDF export and any PDF-combination code. Run the procedure and compare the results in View > Immediate Window.
In the same VBA procedure, save Application.ActivePrinter to a String variable before the PDF operation. If the value changes, assign the saved value back to Application.ActivePrinter before calling PrintOut; ensure the restoration also runs if an error occurs.
Run a separate test that calls the worksheet's PrintOut method without the PDF export or combination code. Compare the result with the full procedure to narrow down where the printer selection changes.

Work with spreadsheets and PDFs in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening spreadsheets, printing worksheets, and exporting PDFs. Its Microsoft Office format compatibility makes it easier to move existing files, though it does not fix Excel for Mac's printer or VBA behavior.

Frequently Asked Questions
Does exporting a worksheet to PDF normally change Excel's active printer?
It should not normally require a printer change. Add Debug.Print Application.ActivePrinter before and after the export and compare the values in the VBA editor's Immediate Window.
Where can I check the default printer on a Mac?
Open System Settings or System Preferences > Printers & Scanners and check the Default printer setting. Also check Application.ActivePrinter in Excel VBA, since Excel's active printer may differ.
How can I restore the printer before VBA calls PrintOut?
Save Application.ActivePrinter to a String variable before the PDF operation, then assign that saved value back to Application.ActivePrinter before the worksheet's PrintOut call. Include restoration in your error-handling path as well.
Could the PDF-combination script be changing the printer?
It should not need to select a printer, but you can check. Inspect the AppleScript or MacScript for printer-setting commands and record Application.ActivePrinter immediately before and after the script runs.




