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:
00777979
Views:
23
This message has been marked as a message which has helped to the initial question of the thread.
*-- 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.

Cathy


>Hello all
>
>how to set the printer default printer. right now after i display the report in adobe and later redisplay the file in visual fox, the printer changes to Adobe PDFWriter, how can i change it back to default printer ( whatever it is)
>
>Thanks for any input.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform