Microsoft Office Tutorials and References
In Depth Information
19.3.40 PrintOut Method
RangeObject .PasteSpecial( Paste , Operation , SkipBlanks , Transpose )
The Paste parameter indicates what will be pasted and is one of the following XlPasteType
constants:
Enum XlPasteType
xlPasteValues = -4163
xlPasteComments = -4144
xlPasteFormulas = -4123
xlPasteFormats = -4122
xlPasteAll = -4104 ' Default
xlPasteAllExceptBorders = 6
End Enum
The optional Operation parameter specifies a paste operation and can be one of the following
XlPasteSpecialOperation constants:
Enum XlPasteSpecialOperation
xlPasteSpecialOperationNone = -4142 ' Default
xlPasteSpecialOperationAdd = 2
xlPasteSpecialOperationSubtract = 3
xlPasteSpecialOperationMultiply = 4
xlPasteSpecialOperationDivide = 5
End Enum
The SkipBlanks parameter should be set to True to skip pasting blank cells from the Clipboard.
To illustrate, suppose that the cell on the Clipboard that is destined to be pasted into cell D5 is
blank. If SkipBlanks is False (the default), then whatever is in D5 before the paste operation
will be overwritten when the blank cell is pasted, so D5 will then be empty. However, if
SkipBlank is True , the blank cell will not be pasted into D5 and so the contents of D5 will not
be disturbed.
The optional Transpose parameter can be set to True to transpose rows and columns when the
range is pasted. The default value is False .
19.3.40 PrintOut Method
The PrintOut method prints a range. (This method applies to a host of other objects as well, such
as Worksheet, Workbook, and Chart.) The syntax is:
RangeObject .PrintOut( From , To, Copies , Preview , _
ActivePrinter , PrintToFile , Collate )
Note that all of the parameters to this method are optional.
The From parameter specifies the page number of the first page to print, and the To parameter
specifies the last page to print. If omitted, the entire object (range, worksheet, etc.) is printed.
The Copies parameter specifies the number of copies to print. The default is 1 .
Set Preview to True to invoke print preview rather than printing immediately. The default is
False . ActivePrinter sets the name of the active printer.
Search JabSto ::




Custom Search