Dynamic Connect Printer

M

Madison

Hi There,

I wrote the program in VB6 to connect and remove printer when it needs. It
works fine with XP window but when we moved to Vista window that codes are
not working any more. Anybody has the way to get it works with Vista window.
Here is my coding for connecting printer

CardPrinter = "\\myserver\RM_color"
Set wshNetwork = CreateObject("Wscript.Network")
wshNetwork.AddWindowsPrinterConnection CardPrinter, "HP Color LaserJet 4500"
wshNetwork.SetDefaultPrinter CardPrinter

Set wshNetwork = Nothing

Please any advise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top