Visual Basic Scripting Edition | Language Reference |
Writes a specified number of newline characters to a TextStream file.
object.WriteBlankLines(lines)
object
Required. Always the name of a TextStream object.
lines
Required. Number of newline characters you want to write to the file.
The following example illustrates use of the WriteBlankLines method:
Function WriteBlankLinesToFile
Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True)
f.WriteBlankLines 2
f.WriteLine "Hello World!"
Set f = fso.OpenTextFile("c:\testfile.txt", ForReading)
WriteBlankLinesToFile = f.ReadAll
End Function
Close Method | Read Method | ReadAll Method | ReadLine Method | Skip Method | SkipLine Method | Write Method | WriteLine Method
Applies To: TextStream Object