![]() |
Choose the printer at runtime |
IntroductionA Frequently Asked Question is : how do I choose dynamically the printer ? Magic has 2 ways to choose the printer :
[MAGIC_PRINTERS]PrinterInstead of defining several Magic printers, define only one printer, Printer for instance, and use it each time you want to print. To change the printer, do an INIPUT ('[MAGIC_PRINTERS]Printer = '&RTRIM (A)&',,,60') where A is a string that contains the printer name (it's the name you find in the printer folder), or that remains blank to print to the default printer. A is the only parameter in the line that is useful for Windows printing. You can set up a file, that for example associates a specific edition to a printer, and choose the printer at runtime, without user interaction DownloadDownload this quick sample, that uses GET.DLL to list printers. |