WriteBlankLines Method

Office VBScript

Microsoft® Visual Basic® Scripting Edition WriteBlankLines Method  Scripting Run-Time Reference 
Version 2 

See Also                    Applies to


Description
Writes a specified number of newline characters to a TextStream file.
Syntax
object.WriteBlankLines(lines)

The WriteBlankLines method syntax has these parts:

Part Description
object Required. Always the name of a TextStream object.
lines Required. Number of newline characters you want to write to the file.

Remarks
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