Printer Pool and WshNetwork
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I am chaning default printer using WshNetwork. In my project there is a printer pool and machine is Win2k. My code works fine on my machine(XP). But when i try to change the printer on Win2K it doesn't work, if one of the printer is turned off on the printer pool. Here is the code: Dim WshNetwork = CreateObject("WScript.Network") WshNetwork.SetDefaultPrinter(cbobwprinter.Text) MsgBox("Success") Catch ex As Exception MsgBox(ex.ToString) MsgBox("Can't set the default printer!", MsgBoxStyle.Critical) Any idea why it won't work in Win2K! .Net framework is installed on Win2K box. Thanks Zulfikar Ali