PrintOut Method
The PrintOut method carries out the PrintOut action in Visual Basic.
expression.PrintOut(PrintRange, PageFrom, PageTo, PrintQuality, Copies, CollateCopies)
expression Required. An expression that returns one of the objects in the Applies To list.
PrintRange Optional AcPrintRange.
AcPrintRange can be one of these AcPrintRange constants. |
acPages |
acPrintAll default |
acSelection
If you leave this argument blank, the default constant (acPrintAll) is assumed. |
PageFrom Optional Variant. A numeric expression that's a valid page number in the active form or datasheet. This argument is required if you specify acPages for the printrange argument.
PageTo Optional Variant. A numeric expression that's a valid page number in the active form or datasheet. This argument is required if you specify acPages for the printrange argument.
PrintQuality Optional AcPrintQuality.
AcPrintQuality can be one of these AcPrintQuality constants. |
acDraft |
acHigh default |
acLow |
acMedium
If you leave this argument blank, the default constant (acHigh) is assumed. |
Copies Optional Variant. A numeric expression. If you leave this argument blank, the default (1) is assumed.
CollateCopies Optional Variant. Use True (–1) to collate copies and False (0) to print without collating. If you leave this argument blank, the default (True) is assumed.
Remarks
For more information on how the action and its arguments work, see the action topic.
You can leave an optional argument blank in the middle of the syntax, but you must include the argument's comma. If you leave one or more trailing arguments blank, don't use a comma following the last argument you specify.
Example
The following example prints two collated copies of the first four pages of the active form or datasheet:
DoCmd.PrintOut acPages, 1, 4, , 2