Version: 2.5
Copies (saves) the contents of an opened Stream object to a specified file.
The SaveToFile method can be called when you want to save the binary contents of a
Stream object to a local file.
This can be an already existing file or a newly created file.
After the save is accomplished, the position will be set to zero.
If you save to an existing file, all existing bytes contained in the file will be completely
overwritten.
This method does not change or affect the Stream object in any way.
There is one mandatory and one optional parameter.
SaveOptionsEnum Constants
Constant | Value | Description |
---|---|---|
adSaveCreateNotExist | 1 | Default, creates a new file |
adSaveCreateOverwrite | 2 | Completely overwrite data in an existing file |
objStream.SaveToFile
Chant43.txt, adSaveCreateOverwrite