Syntax 3: For RichTextEdit controls
Description
Prints the contents of a RichTextEdit control.
Applies to
RichTextEdit controls
Syntax
|
1 |
rtename.Print ( copies, pagerange, collate, canceldialog ) |
|
Argument |
Description |
|---|---|
|
rtename |
The name of the RichTextEdit control whose contents you |
|
copies |
An integer specifying the number of copies you want to |
|
pagerange |
A string describing the pages you want to print. To When rtename shares data with a DataWindow, pagerange |
|
collate |
A boolean value indicating whether you want the copies TRUE — Collate copies FALSE — Do not collate copies |
|
canceldialog |
A boolean value indicating whether you want to display a TRUE — Display the dialog box FALSE — Do not display the dialog box |
Return value
Integer. Returns 1 if it succeeds and -1 if an error
occurs.
Usage
When the RichTextEdit control shares data with a DataWindow, the
total number of pages contained in the control is the page count of the
document multiplied by the row count of the DataWindow.
You can specify printed page numbers by including an input field
in the header or footer of your document.
Examples
This statement prints one copy of pages 1 to 5 of the document in
the RichTextEdit control rte_1. The output is not collated and a dialog
box displays to allow the user to cancel the printing:
|
1 |
rte_1.Print(1, "1-5", FALSE, TRUE) |
See also