Access Cookbook - Ken Getz [115]
Figure 5-4. frmPrintSettings shows print information for rptReport1
Discussion
Each form and report has a Printer property that holds a reference to a Printer object for that form or report. By setting the properties of a form/report's Printer object, you can control how the form/report will print. Table 5-2 lists the object's properties, along with their possible values. None of these properties is read-only. Table 5-3 shows a list of all the defined paper sizes. You can use one of these constants in the PaperSize property to set a new paper size. Table 5-4 shows possible values for the PaperBin property of the Printer object.
Table 5-2. Properties of the Printer object
Field name
Contains
Data type
Values
Orientation
Paper orientation
AcPrintOrientation acPRORLandscape or acPRORPortrait
PaperSize
Size of the physical page to print on
AcPrintPaperSize A value from Table 5-3 (depending on which paper sizes the printer supports)
Copies
If the printing device supports multiple copies, the number of copies to be printed
Long
PaperBin
Default bin from which paper is to be fed
AcPrintPaperBin A value from Table 5-4
PrintQuality
Printer resolution
AcPrintObjQuality acPRPQDraft, acPRPQHigh, acPRPQLow, or acPRPQMedium
ColorMode
Color usage, if the printer supports color printing
AcPrintColor acPRCMColor or acPRCMMonochrome
Duplex
Duplex usage, if the printer supports duplex printing
AcPrintDuplex acPRDPHorizontal, acPRDPSimplex, or acPRDPVertical
Table 5-3. Constants and descriptions for the PaperSize property
Constant
Value
Description
acPRPS10X14
16
10 × 14 in
acPRPS11X17
17
11 × 17 in
acPRPSA3
8
A3 (297 × 420 mm)
acPRPSA4
9
A4 (210 × 297 mm)
acPRPSA4SMALL
10
A4 Small (210 × 297 mm)
acPRPSA5
11
A5 (148 × 210 mm)
acPRPSB4
12
B4 (250 × 354 mm)
acPRPSB5
13
B5 (182 × 257 mm)
acPRPSCSHEET
24
C size sheet (17 × 22 in)
acPRPSDSHEET
25
D size sheet (22 × 34 in)
acPRPSEnv10
20
Envelope #10 (4.125 × 9.5 in)
acPRPSEnv11
21
Envelope #11 (4.5 × 10.375 in)
acPRPSEnv12
22
Envelope #12 (4.25 × 11 in)
acPRPSEnv14
23
Envelope #14 (5 × 11.5 in)
acPRPSEnv9
19
Envelope #9 (3.875 × 8.875 in)
acPRPSEnvB4
33
Envelope B4 (250 × 353 mm)
acPRPSEnvB5
34
Envelope B5 (176 × 250 mm
acPRPSEnvB6
35
Envelope B6 (176 × 125 mm)
acPRPSEnvC3
29
Envelope C3 (324 × 458 mm)
acPRPSEnvC4
30
Envelope C4 (229 × 324 mm)
acPRPSEnvC5
28
Envelope C5 (162 × 229 mm)
acPRPSEnvC6
31
Envelope C6 (114 × 162 mm)
acPRPSEnvC65
32
Envelope C65 (114 × 229 mm)
acPRPSEnvDL
27
Envelope DL (110 × 220 mm)
acPRPSEnvItaly
36
Envelope (110 × 230 mm)
acPRPSEnvMonarch
37
Envelope Monarch (3.875 × 7.5 in)
acPRPSEnvPersonal
38
6-3/4 Envelope (3.625 × 6.5 in)
acPRPSESheet
26
E size sheet (34 × 44 in)
acPRPSExecutive
7
Executive (7.25 × 10.5 in)
acPRPSFanfoldLglGerman
41
German Legal Fanfold (8.5 × 13 in)
acPRPSFanfoldStdGerman
40
German Std Fanfold (8.5 × 12 in)
acPRPSFanfoldUS
39
US Std Fanfold (14.875 × 11 in)
acPRPSFolio
14
Folio (8.5 × 13 in)
acPRPSLedger
4
Ledger (17 × 11 in)
acPRPSLegal
5
Legal (8.5 × 14 in)
acPRPSLetter
1
Letter (8.5 × 11 in)
acPRPSLetterSmall
2
Letter Small (8.5 × 11 in)
acPRPSNote
18
Note (8.5 × 11 in)
acPRPSQuarto
15
Quarto (215 × 275 mm)
acPRPSStatement
6
Statement (5.5 × 8.5 in)
acPRPSTabloid
3
Tabloid (11 × 17 in)
acPRPSUser
256
User-defined
Table 5-4. Constants and descriptions for the PaperBin property
Constant
Value
Description
acPRBNAuto
7
Automatic bin
acPRBNCassette
14
Cassette bin
acPRBNEnvelope
5
Envelope bin
acPRBNEnvManual
6
Envelope manual bin
acPRBNLargeCapacity
11
Large-capacity