Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting windows printer programatically
Message
De
24/08/1999 07:49:14
 
 
À
24/08/1999 03:33:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00256943
Message ID:
00256970
Vues:
25
>I haven been trying to store the windows printer name in a variable or property with Var = SET(Printer,3). When I try to restore the setting by issuing SET PRINTER TO NAME Var OR SET PRINTER TO NAME &Var, I get an error accessing the spooler. I can type the actual names in the command window and never have a problem. This only occurs when I try to use a variable. Is there a trick to this? Thanks.

Try using name resolution rather than macro expansion:

SET PRINTER TO NAME (Var)

You can also simply issue SET PRINTER TO without any parameters to set the printer back to the default Windows printer.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform