Printing Problems

Fix Excel for Mac Printing to PDF Instead of the Default Printer

Tauseeq MagsiTauseeq Magsi Nov 14, 2026 868 views

Question details

Identify why an Excel for Mac VBA procedure prints to a PDF file instead of the intended printer after a PDF export.

Fix Excel for Mac Printing to PDF Instead of the Default Printer
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.
Before you start

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.

Solution 1Recommended

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.

1
Check the macOS default printer

Open System Settings or System Preferences > Printers & Scanners, and check the Default printer setting. Select the intended printer if necessary.

2
Inspect the VBA and scripts

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.

3
Record the active 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.

4
Restore the printer if it changes

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.

5
Test printing separately

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.

Check and restore Excel's active printer around the PDF export
Active printer and default printer: Excel's active printer and the macOS default printer may not be the same. Check both rather than assuming that changing the macOS default will update Excel's selection.
Free Microsoft Office alternative

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.

Print spreadsheets and export worksheets to PDFOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar interface for a smoother transition from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

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.