I am relatively amateurish in developing applications, but have been doing it on and off for many years.
I am setting up an application for my daughter's rural veterinary business that will store information about her business, clients and animals and which will print invoices and statements of account for her clients.
She runs Windows 7 operating system and has Corel Office X4 installed on a small network of two computers and two printers.
My problem is that I want the invoices to print on her Lexmark T632 printer, which works okay, but I cannot find a way of telling the application to take the paper from Tray 2 on that printer.
Is there some code I can write into the application that directs the report to a particular tray on the printer?
Use the printerSetOptions() procedure along with a PrinterOptionInfo type variable to to set the paper tray, paper size, etc.
Given a PrinterOptionInfo variable named prnOptions, use the following line of code to set your printer to the lower tray:
; Use constant to specify lower paper tray. prnOptions.DefaultSource = prnLower
Here is a list of all the PrintSource constants:
prnAuto - Paper source selected automatically
prnCassette - Cassette
prnEnvelope - Envelope, automatic feed
prnEnvManual - Envelope, manual feed
prnLargeCapacity - Large capacity paper source
prnLargeFmt - Large format paper source
prnLower - Lower paper tray
prnManual - Manual feed
prnMiddle - Middle paper tray
prnOnlyOne - Single paper tray
prnSmallFmt - Small format paper source
prnTractor - Tractor feed paper
prnUpper - Upper paper tray
The PrintSource constants above are used with the DefaultSource field of the PrinterOptionInfo record structure.
The following is the PrinterOptionInfo structure:
Orientation - Paper orientation (portrait or landscape). Use a PrinterOrientation constant to test the value.
PaperSize - Paper size. Use a PrinterSizes constant to test the value.
PaperWidth - Custom paper width in twips (maximum of 64K twips). This value is converted internally to the tenths of a millimeter required by Windows.
PaperLength - Custom paper length in twips (maximum of 64K twips). This value is converted internally to the tenths of a millimeter required by Windows.
Scale - Scaling factor in percent. A scale value of 50 reduces the original to one-half its size. A value of 200 increases the original to twice its size. Scaling only applies to printers that support scaling for all functions, graphics, and fonts (e.g., Postscript printers and the Microsoft Windows Printing System).
Copies - Number of copies for the printer to make. The Copies option works only with page printers (e.g., laser printers) where the full page can be held in printer memory. Some printer drivers support this feature on printers that cannot do full page printing. The Copies setting is equivalent to unchecking the Collate button in the Print File dialog box. Output is not collated. This operation is faster than repeatedly sending the full document to the printer, but requires hand sorting at completion.
DefaultSource - Bin, tray, or feeder used by the default printer. Use a PrintSources constant to test the value.
PrintQuality - Higher print qualities are used for final output, and lower print qualities for draft output. Lower quality prints differ significantly from the preview appearance of the document. Use a PrintQuality constant to test the value.
Color - Sets color printers to color or monochrome printing. Monochrome printing is usually faster. Use a PrintColor constant to test the value.
Duplex - Double-sided printing. Some printer drivers can support double-sided printing on otherwise single-sided printers by making two passes over the document. Use a PrintDuplex constant to test the value.
Refer to the ObjectPAL help file for details or ask questions here.