DoCmd.PrintOut (Access)
The PrintOut method carries out the PrintOut action in Visual Basic.
You can use the PrintOut action to print the active object in the open database. You can print datasheets, reports, forms, data access pages, and modules.
PrintOut (PrintRange, PageFrom, PageTo, PrintQuality, Copies, CollateCopies)
DoCmd.PrintOut acPages, 1, 4, , 2
Arguments
Optional arguments
The following arguments are optional
PrintRange (AcPrintRange) - An AcPrintRange constant that specifies the range to print. The default value is acPrintAll.
Possible return values are acPages - A specific range of pages will be printed. Use the PageFrom and PageTo arguments to specify the range of pages to print, acPrintAll - Prints all of the object, acSelection - Prints the selected part of the object.
PageFrom (AcPrintRange) - The first page to print. 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.
Possible return values are acPages - A specific range of pages will be printed. Use the PageFrom and PageTo arguments to specify the range of pages to print, acPrintAll - Prints all of the object, acSelection - Prints the selected part of the object.
PageTo (AcPrintRange) - The last page to print. 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.
Possible return values are acPages - A specific range of pages will be printed. Use the PageFrom and PageTo arguments to specify the range of pages to print, acPrintAll - Prints all of the object, acSelection - Prints the selected part of the object.
PrintQuality (AcPrintQuality) - An AcPrintQuality constant that specifies the print quality. The default value is acHigh.
Possible values are
acDraft | Draft quality |
acHigh | High quality |
acLow | Low quality |
acMedium | Medium quality |
Copies (Long) - The number of copies to print. If you leave this argument blank, the default (1) is assumed.
CollateCopies (Boolean) - Use True (1) to collate copies and False (0) to print without collating. If you leave this argument blank, the default (True) is assumed.