Control Reference > VSPrinter Control > VSPrinter Methods > PrintDoc Method (VSPrinter) |
Prints the current document (being previewed) on the printer.
[form!]VSPrinter.PrintDoc [ Choose As Variant ], [ FromPage As Variant ], [ ToPage As Variant ]
The parameters for the PrintDoc method are described below:
Parameter |
Description |
Choose |
If set to True, the control displays a Print Setup dialog before printing the document. Optional, defaults to False. |
FromPage |
Selects the first page to be printed. May also be set to a string containing a complex page range (for example, "1-5, 7, 9-11"). Optional, defaults to one. |
ToPage |
Selects the last page to be printed. Optional, defaults to PageCount. |
Note: If you use the Choose parameter to display a dialog box and the user changes the paper size, the document may look distorted when printed. The alternative is to call the PrintDialog method yourself, and regenerate the document in response to new user settings. |