Name
workbook
.PrintOut([From
], [To
], [Copies
], [Preview
], [ActivePrinter
], [PrintToFile
], [Collate
], [PrToFileName
])
Synopsis
Prints the workbook.
Argument |
Settings |
---|---|
|
The starting page number to print. |
|
The ending page number to print. |
|
The number of copies to print. |
|
True previews the workbook before printing; False does not (default). |
|
The name of the printer to use. |
|
True sends output to a file; False sends output to the printer (default). |
|
True prints in collated order; False prints from first page to last (default). |
|
If |
The following code prints the first page of the current workbook:
ThisWorkbook.PrintOut 1, 1
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.