File: WriteAllLines

WriteAllLines

Opens a file, writes all strings to the file with appended new line values, then closes the file.



 Public Sub WriteAllLines(
	  ByRef Path As String,
	  ByRef Contents As Variant,
	  Optional ByVal Encoding As Encoding )

Parameters

Path
[ByRef] String. The path and filename of the file to write to.
Contents
[ByRef] Variant. The strings to be written to the file.
Encoding
[ByVal] Optional. Encoding. The encoding to be used when writing to the file.

Remarks

If the file doesnt exist it will be created. If the file already exists, it will be overwritten.

See Also

Project CorLib Overview

Class File Overview