E.18. The Printer Object

Access VBA allows you to manipulate the printers available on your system through code. All available printers are members of the Printers collection. You can access an individual printer through the Printer object.

E.18.1. Printer Object Properties

The properties of the Printer object are listed in the following table.

PropertiesData TypeDescription
BottomMarginLongSpecifies the bottom margin for the printed page
ColorModeacPrintColor (acPRCMColor, acPRCMMonochrome)Specifies whether the printer should output in color or monochrome mode
ColumnSpacingLongSpecifies the vertical space between detail sections (in twips)
CopiesLongIndicates the number of copies to be printed
DataonlyBooleanTrue if Access only prints the data and not the labels, borders, gridlines, and graphics
DefaultSizeBooleanTrue when the size of the detail section in design view is used for printing. False if the ItemSizeHeight and ItemSizeWidth properties are used
DeviceNameStringName of the printer
DriverNameStringName of the driver used by the specified printer
DuplexacPrintDuplex (acPRDPHorizontal, acPRDPSimplex, acPRDPVertical)Specifies how the printer handles duplex printing
ItemLayoutacPrintItemLayout (acPRHorizontalColumnLayout, acPRVerticalColumnLayout)Specifies whether the printer lays out columns across, then down, or down, then across
ItemsAcrossLongIndicates the number of columns to print across a page
ItemSizeHeightLongSpecifies the height of the detail section in twips
ItemSizeWidthLongSpecifies the width of the detail section in twips
LeftMarginLongSpecifies the left margin for the printed page
OrientationacPrintOrientation (acPRORLandscape, acPRORPortrait)Specifies the print orientation
PaperBinacPrinterBin (acPRBNAuto, acPRBNCassette, acPRBNEnvelope, acPRBNEnvManual, acPRBNFormSource, acPRBNLargeCapacity, acPRBNLargeFmt, acPRBNLower, acPRBNManual, acPRBNMiddle, acPRBNSmallFmt, acPRBNTractor, acPRBNUpperSpecifies which paper bin the printer should use
PaperSizeacPrintPaperSize (various)Specifies the paper size to use when printing
PortStringSpecifies the port name for the specified printer
PrintQualityacPrintObjQuality (acPRPQDraft, acPRPQHigh, acPRPQLow, acPRPQMedium)Specifies the resolution the printer uses to print jobs
RightMarginLongSpecifies the right margin for the printed page
RowSpacingLongSpecifies the horizontal space between detail sections (in twips)
TopMarginLongSpecifies the top margin for the printed page

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.78.41