Control Reference > VSPrinter Control > VSPrinter Methods > SaveDoc Method (VSPrinter) |
Saves the current document to disk.
[form!]VSPrinter.SaveDoc FileName As String, [ Compress As Variant ], [ FromPage As Variant ], [ ToPage As Variant ]
The SaveDoc and LoadDoc methods are useful for loading documents that take a long time to generate and do not change often, or to distribute documents that you create so that others can view and print them.
The parameters for the SaveDoc method are described below:
Parameter |
Description |
FileName |
Name of the file to be saved. |
Compress |
Specifies whether the file should be saved in compressed form. Compression typically reduces file size to about 25% of the uncompressed size, but saving takes about twice as long. Optional, defaults to True. |
FromPage |
First page to save. Optional, defaults to one. |
ToPage |
Last page to save. Optional, defaults to PageCount. |
While the document is being saved, the VSPrinter control fires the SavingDoc event before each page is saved. This allows you to provide user feedback while the document is being saved. You may also cancel the save operation.