>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.