General information
Category:
Windows API functions
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only