To add data to text files:
Using the OpenTextFile method of the fso object or the OpenAsTextStream method of the file object, open a file.
Using the Write, WriteLine, or WriteBlankLines methods of the TextStream object, write data to the file:
Write—Without a trailing newline character
WriteLine—With a trailing newline character
WriteBlankLines—With one or more blank lines
Using the Close method of the TextStream object, close the file.
The newline character contains a character or characters (depending on the operating system) that advances the cursor to the beginning of the next line. The ends of some lines may include non-printing characters; in such cases, the newline character may duplicate an existing character or characters. |