DoCmd.PrintOut method (Access)
The PrintOut method carries out the PrintOut action in Visual Basic.
Syntax
expression.PrintOut (PrintRange, PageFrom, PageTo, PrintQuality, Copies, CollateCopies)
expression A variable that represents a DoCmd object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
PrintRange | Optional | AcPrintRange | An AcPrintRange constant that specifies the range to print. The default value is acPrintAll. |
PageFrom | Optional | Variant | 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. |
PageTo | Optional | Variant | 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. |
PrintQuality | Optional | AcPrintQuality | An AcPrintQuality constant that specifies the print quality. The default value is acHigh. |
Copies | Optional | Variant | The number of copies to print. 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
Use the PrintOut action to print the active object in the open database. You can print datasheets, reports, forms, data access pages, and modules.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기