Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 3.18 KB

Access.Printer.md

File metadata and controls

87 lines (62 loc) · 3.18 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Printer object (Access)
vbaac10.chm12880
vbaac10.chm12880
Access.Printer
fba3eb15-db93-943a-421c-291761e7fa2b
03/21/2019
medium

Printer object (Access)

A Printer object corresponds to a printer available on your system.

Remarks

A Printer object is a member of the Printers collection.

To return a reference to a particular Printer object in the Printers collection, use any of the following syntax forms.

Syntax Description
Printers!devicename The devicename argument is the name of the Printer object as returned by the DeviceName property.
Printers("devicename") The devicename argument is the name of the Printer object as returned by the DeviceName property.
Printers(index) The index argument is the numeric position of the object within the collection. The valid range is from 0 to Printers.Count-1.

Use the properties of the Printer object to set the printing characteristics for any of the printers available on your system.

Use the ColorMode, Copies, Duplex, Orientation, PaperBin, PaperSize, and PrintQuality properties to specify print settings for a particular printer.

Use the LeftMargin, RightMargin, TopMargin, BottomMargin, ColumnSpacing, RowSpacing, DataOnly, DefaultSize, ItemLayout, ItemsAcross, ItemSizeHeight, and ItemSizeWidth properties to specify how Microsoft Access should format the appearance of data on printed pages.

Use the DeviceName, DriverName, and Port properties to return system information about a particular printer.

Example

The following example displays system information about the first printer in the Printers collection.

Dim prtFirst As Printer 
 
Set prtFirst = Application.Printers(0) 
 
With prtFirst 
 MsgBox "Device name: " & .DeviceName & vbCr _ 
 & "Driver name: " & .DriverName & vbCr _ 
 & "Port: " & .Port 
End With

Properties

See also

[!includeSupport and feedback]