>I have an application that needs to print tickets on a strip printer and print an audit trail on a dot matrix printer. I have the strip printer set as default and would like to print to the audit printer after each input screen. I need to be able to change the printer through programming and not through a dialog box. Does anyone know how this can be done. Any help would be appreciated.
Hi Mac:
Well, if you can 'lock in' the name of each printer as installed on the PC where you are using this, you can save the default printer with:
yyyy = SET('Printer', 3)
then, just 'hard-code' the one you want with:
SET PRINTER TO NAME (xxxxx)
Then set it back when done -- SET PRINTER TO NAME (yyyy).
The only danger is that if someone changes the (ie: RENAME's) the printers installed on that PC, it will 'blow' the above technique. There are some approaches in, I think FAQ and the Files section here on UT that could be used to directly access the registry entries to change the default printer as well, but I personally don't like to hack into it -- its too fragile as it is...
HTH
Rob
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only