Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you change the default printer?
Message
From
21/12/1999 20:19:03
 
 
To
21/12/1999 20:00:35
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00307039
Message ID:
00307048
Views:
19
>I know SYS(1037) gives you a dialog. Also I know you can you SET PRINTER TO NAME GETPRINTER() but I thought there was a more efficient way to do this.

Changing the Windows default printer got much easier with the release of WSH 2.0; the Wscript.Network object now has a SetDefaultPrinter method which can take the returned printer name or device name string from the VFP GETPRINTER() as a valid argument. VFP is quite happy with the reassignment done through the SetDefaultPrinter method, and it sticks!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform