XPRINT SET TRAY statement  

Purpose

Set a new active printer tray.

Syntax

XPRINT SET TRAY numrexp

Remarks

XPRINT SET TRAY changes the active paper tray on the host printer to that specified by numrexp.  The following equates are predefined in the compiler, and represent the most common paper trays:

%DMBIN_UPPER         = 1
%DMBIN_LOWER         = 2
%DMBIN_MIDDLE        = 3
%DMBIN_MANUAL        = 4
%DMBIN_ENVELOPE      = 5
%DMBIN_ENVMANUAL     = 6
%DMBIN_AUTO          = 7
%DMBIN_TRACTOR       = 8
%DMBIN_SMALLFMT      = 9
%DMBIN_LARGEFMT      = 10
%DMBIN_LARGECAPACITY = 11
%DMBIN_CASSETTE      = 14
%DMBIN_FORMSOURCE    = 15

Other tray codes may be defined by Windows or printer suppliers, so your program should be written to consider that possibility.  You can use XPRINT GET TRAYS to obtain a list of all the paper trays supported by the attached host printer.

If the printer does not support the tray change requested, error 5 is generated.  If executed without a host printer attached, error 57 is generated.

See also

XPRINT ATTACH, XPRINT GET TRAY, XPRINT GET TRAYS