Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the default printer
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00408792
Message ID:
00408800
Views:
15
You can use WSH to do this:

WshNetwork=CreateObject("WScript.Network")
WshNetwork.SetDefaultPrinter("\\Server\Print1")

This is straight conversion from VB code but should work.


>Hi all:
>How can I change the default windows printer using a WIN32API?
>SET PRINTER TO NAME "prt-name" doesn´t change permanently.
>
>TIA
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform