TextStream Object |
Description
The TextStream object represents a text file. You can open a TextStream object to read, append, or write. The TextStream object provides methods to read, write, and close the text file.
The TextStream object is one of objects in the File System object model; for an overview of the model, including the library reference needed to access it, see the File System object model entry.
Createable
No
Returned by
File.OpenTextStream Method, FileSystemObject.CreateTextFile Method, FileSystem-Object.OpenTextFile Method
Properties
All of the following TextStream object properties are read-only:
AtEndOfLine
Data Type: Boolean
A flag denoting when the end of a line marker has been reached. Only relevant when reading a file.
AtEndofStream
Data Type: Boolean
A flag denoting when the end of the stream has been reached. Only relevant when reading a file.
Column
Data Type: Long
Returns the column number position of the file marker.
Line
Data Type: Long
Returns the line number position of the file marker.
Methods
Close | Read | ReadAll |
ReadLine | Skip | SkipLine |
Write | WriteBlankLines | WriteLine |
Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.