P113 Print Files

/P#

Meaning

Extra Parameters: /1{Parameter1} … /n{Nth Parameter}

113

Print worksheet(s) in one or more workbooks

/1 = sPrinter (not sure what this is, use the user interface to see strings associated with printers). DO NOT INCLUDE QUOTATION CHARACTERS (i.e. “ or ‘) IN THIS PARAMETER.

/2 = sSheetsToPrint (by name or number)

/3 = sRange (leave blank for ‘used range’)

/4 = lNumber of copies

/5 = lPageFrom (leave empty to start printing from the beginning)

/6 = lPageTo (leave empty to terminate printing at the end)

/7 = bCollate (“TRUE” or “FALSE”). Set to ”TRUE” to collate multiple copies

/8 = bPrintToFile (“TRUE” or “FALSE”). Set to “TRUE” if printing to a file. You must specify an output file if printing to a file.

This special process can clear the contents that you specify in the range that you specify.

Special Parameters Described in Detail

/1{sPrinter} String associated with the printer you wish to print to. If you are not sure about this, use the graphical user interface and save a ‘conversion job’ from the file menu. Open this ‘conversion job’ file in notepad to see the string associated with the printer you used.

/2{ sSheetsToPrint } Name or number of the sheet(s) to print. Required.

/3{sRange} Range of cells being printed (i.e. “A1:B4, J10”). Leave empty for ‘used range’.

/4{lNumberOfCopies} Numeric value specifying the number of copies to print

/5{lPageFrom} You can optionally specify a range of pages to print by using this and the lPagesTo parameters. Leave empty to simply print the range chosen

/6{lPageTo} You can optionally specify a range of pages to print by using this and the lPagesTo parameters. Leave empty to simply print the range chosen

/7{bCollate} If doing numerous copies of a print job that has more than one page, you may want to keep them in proper order by setting this parameter to “TRUE”.

/8{bPrintToFile} Set to “TRUE” to print to a file. If you are printing to a file, the output file must be specified.

Examples:

EXAMPLE 1: Print the 2nd sheet in a workbook