Hello
Here is a VBA code to set the default printer to Microsoft Print to PDF:
CreateObject("WScript.Network"). SetDefaultPrinter "Microsoft Print to PDF"
Kind regards
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
how to write VBA Code for Ensuring when print is done, it is done automatically using Microsoft Print to PDF using VBA Code in the macro called as "RUN PRINT"
Please share the code
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hello
Here is a VBA code to set the default printer to Microsoft Print to PDF:
CreateObject("WScript.Network"). SetDefaultPrinter "Microsoft Print to PDF"
Kind regards
Hello,
If you run this macro, it will change the default printer to Microsoft Print to PDF, regardless of the current default printer.
Kind Regards
Set the new default printer Application.ActivePrinter = "Printer Name Here"
Using above code, how to set default printer to MS Print to PDF here?
Hi Sir,
I have entered above code in my VBA macro. It is working now.
But I want to ask you one query:
IF suppose, my printer selected by default in control Panel is ABC Company Printer, after running this macro, whether it will force the change from ABC Printer to MS Print to PDF?
Please advice.
Hi, OK thanks Sir.