-
Solved: Map and make default a printer
Came across this code, thought I would share:
1) Copy the text below the line
2) Amend the server and printer names (strPrinterUNC = \\Servername\Printername)
3) Save as a VBS file on the network
4) Repeat steps 1-3 for different printers
5) Send people the link to the file.
Note: This both maps and sets the printer as default. If the printer is already there, it will just map it.
----------------------------------
[VBA]Option Explicit
Dim strPrinterUNC, objNetwork
strPrinterUNC = "\\Servername\Printername"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strPrinterUNC
objNetwork.SetDefaultPrinter strPrinterUNC
Set objNetwork = Nothing
msgbox "Printer '" & strPrinterUNC & "' Mapped and set as default"
[/VBA]
-Once my PC stopped working, so I kicked it......Then it started working again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules