Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set the printer name set to default printer
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00777969
Message ID:
00777984
Views:
19
>
>*-- Remember the current default printer
>LOCAL lcPrinter
>lcPrinter = SET('PRINTER',3)
>
>*-- Set the printer to the PDF printer and print the report
>SET PRINTER TO NAME 'blah blah blah'
>REPORT FORM MyReport NOCONSOLE TO PRINTER
>
>*-- Restore default printer and print report again
>SET PRINTER TO NAME "&lcPrinter"
>REPORT FORM MyReport NOCONSOLE TO PRINTER
>
>
>Notice the quotes around the macro substitution of the printer name. This is required if the printer name has any spaces in it.
>
Hi Cathy,

You don't need macro substutution at all
SET PRINTER TO NAME (lcPrinter)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform