Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default Windows Printer (Strange problem)
Message
From
12/09/2000 11:14:51
 
 
General information
Forum:
Visual Basic
Category:
Windows API functions
Miscellaneous
Thread ID:
00414797
Message ID:
00415405
Views:
23
>>Hello.
>>I write code for Set default windows printer
>>I have strange problem. When I place MSGBOX("Run") in method.. I see.. Default printer was set. But If I rem MSGBOX() the old printer stay as default.
>>Can you explain that?
>
>
>The easy solution is to use the Wscript.Network automation object:
>
>oNet = CREATEOBJ('wscript.network')
>oNet.SetDefaultPrinter(Windows Printer Name from AGETPRINTER())
>
>Requires instalation of WSH 2.0 or later; works fine for me, regardless of platform.

Hi Ed!
Yes. I know.. but my chief do't want use WSH. Problem was only in VB code.
But I think easy support code in future will when using WIN32API
Previous
Reply
Map
View

Click here to load this message in the networking platform