Is your default printer situated in the far corner of the office?
Want to print your sheet from the printer by your side?
You can change it in the print dialogue section but you are too lazy to do that too?
Well, most inventive people are lazy, like you and me.
Don’t worry. I’ve got you. Let’s do it using VBA for once and all…
Below is the code that changes your default printer to your choice of printer and sets back the original printer to the default printer.
|Sub Change_Default_Printer() |
Set mynetwork = CreateObject("WScript.network")
mynetwork.setdefaultprinter "Your Printer Name" 'write your printers name here
mynetwork.setdefaultprinter “original_Default_Printer” ‘set back your original printer to default”
Let’s crack each line down.
So how was it? Did it work for you? Was it difficult? Let me know in the comments. Stay tuned for more innovative and easy lessons. Bye.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.