While we are on the subject of printing, I am having trouble printing my
barcode to a specific network printer. I can select a printer using the
printer dialog, but I can't seem to use a stored printer name to direct
my print job to correctly.
In my code I have a variable called LblPrinter which has the name of the
printer. I use the command:
I := Printer.Printers.IndexOf(LblPrinter);
If I >= 0 then Printer.PrinterIndex := I
Else Showmessage('Using default Printer'); //Index is -1
No matter what printer I select, I is always -1...;-(
Any suggestions? When I use the PrinterDialog, I can see the correct
Printer index number and the Printers name, but I can't seem to find it
when I don't use the dialog.
Thanks in advance!
Tom Nesler