Using printui to find all available network printers
RodDog888's code:
VB Code:
Private Sub cmdGlobalAdd_Click()
Shell "Rundll32 printui.dll,PrintUIEntry /ga /c\\localcomputername /n\\servername\printername", vbNormalFocus
End Sub
Private Sub cmdGlobalDelete_Click()
Shell "Rundll32 printui.dll,PrintUIEntry /gd /c\\localcomputername /n\\servername\printername", vbNormalFocus
End Sub
I don't have internet access (except to this site) at work at the moment, so I can't look up the command line parameters for printui. Does anyone know how to use printui to find all printers on the network? Not just printers installed on a workstation, but all available printers on the network?
Or, is there another way to do this? Possibly by looping through each workstation on the network and grabbing its installed printers (which I also can't figure out how to do)? All I can do so far is find the installed printers on my own workstation.
Thanks
Re: Using printui to find all available network printers
Quote:
Originally Posted by 18experience
RodDog888's code:
VB Code:
Private Sub cmdGlobalAdd_Click()
Shell "Rundll32 printui.dll,PrintUIEntry /ga /c\\localcomputername /n\\servername\printername", vbNormalFocus
End Sub
Private Sub cmdGlobalDelete_Click()
Shell "Rundll32 printui.dll,PrintUIEntry /gd /c\\localcomputername /n\\servername\printername", vbNormalFocus
End Sub
I don't have internet access (except to this site) at work at the moment, so I can't look up the command line parameters for printui. Does anyone know how to use printui to find all printers on the network? Not just printers installed on a workstation, but all available printers on the network?
Or, is there another way to do this? Possibly by looping through each workstation on the network and grabbing its installed printers (which I also can't figure out how to do)? All I can do so far is find the installed printers on my own workstation.
Thanks
Hi,
You can do it another way, here's a link:
http://msdn2.microsoft.com/en-us/library/ms811681.aspx
It could be not the best way but you can try.
Wkr,
sparrow1
Re: Using printui to find all available network printers
Sparrow,
I don't have internet access (except to this site) here at work. I know, I know, I will talk to them soon. I haven't been here that long and this hasn't come up until today. Is there any way you could copy/paste or paraphrase?
Thanks
Re: Using printui to find all available network printers
Just to clarify, I know how to install a printer. I just need to (in VB) get a list of all available printers.