Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set printer to name
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00408786
Message ID:
00408835
Views:
14
>I am using the set printer to name command.
>
>set printer to name &cPrinterName
>
>I get the error "error accessing printer spooler".
>
>I only get this error if I have spaces in the printer name. If I rename the printer in my printer settings folder and take out any spaces I no longer get the error, and everything prints fine.
>
>Any Ideas?

Use name resolution rather than macro-expansion:

set printer to name (cPrinterName)

>
>Thanks
>
>Pat Murphy
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
Reply
Map
View

Click here to load this message in the networking platform