Worksheets.PrintOut Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prints the object.
public void PrintOut (object From, object To, object Copies, object Preview, object ActivePrinter, object PrintToFile, object Collate, object PrToFileName);
Public Sub PrintOut (Optional From As Object, Optional To As Object, Optional Copies As Object, Optional Preview As Object, Optional ActivePrinter As Object, Optional PrintToFile As Object, Optional Collate As Object, Optional PrToFileName As Object)
Parameters
- From
- Object
Optional Object. The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.
- To
- Object
Optional Object. The number of the last page to print. If this argument is omitted, printing ends with the last page.
- Copies
- Object
Optional Object. The number of copies to print. If this argument is omitted, one copy is printed.
- Preview
- Object
Optional Object. True to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately.
- ActivePrinter
- Object
Optional Object. Sets the name of the active printer.
- PrintToFile
- Object
Optional Object. True to print to a file. If PrToFileName
is not specified, Microsoft Excel prompts the user to enter the name of the output file.
- Collate
- Object
Optional Object. True to collate multiple copies.
- PrToFileName
- Object
Optional Object. If PrintToFile
is set to True, this argument specifies the name of the file you want to print to.
Remarks
"Pages" in the descriptions of From
and To
refers to printed pages — not overall pages in the sheet or workbook.