Sheets.PrintOut Method
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)
'Usage Dim From As Object Dim To As Object Dim Copies As Object Dim Preview As Object Dim ActivePrinter As Object Dim PrintToFile As Object Dim Collate As Object Dim PrToFileName As Object Dim sheets1 As Sheets sheets1.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName)
void PrintOut( [In, Optional] object From, [In, Optional] object To, [In, Optional] object Copies, [In, Optional] object Preview, [In, Optional] object ActivePrinter, [In, Optional] object PrintToFile, [In, Optional] object Collate, [In, Optional] object PrToFileName );
public void PrintOut( /*in*/System.Object From, /*in*/System.Object To, /*in*/System.Object Copies, /*in*/System.Object Preview, /*in*/System.Object ActivePrinter, /*in*/System.Object PrintToFile, /*in*/System.Object Collate, /*in*/System.Object PrToFileName );
function PrintOut(
From : Object,
To : Object,
Copies : Object,
Preview : Object,
ActivePrinter : Object,
PrintToFile : Object,
Collate : Object,
PrToFileName : Object
);
Parameters
- From
Optional Object. The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.
- To
Optional Object. The number of the last page to print. If this argument is omitted, printing ends with the last page.
- Copies
Optional Object. The number of copies to print. If this argument is omitted, one copy is printed.
- Preview
Optional Object. True to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately.
- ActivePrinter
Optional Object. Sets the name of the active printer.
- PrintToFile
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
Optional Object. True to collate multiple copies.
- PrToFileName
Optional Object. If PrintToFile is set to True, this argument specifies the name of the file you want to print to.