Tutorial-Web Home > The FileSystem Object > The TextStream Object

Object Menu

Drive
File
Folder
FileSystem
TextStream
AtEndOfLine
AtEndOfStream
Column
Line
Close
Read
ReadAll
ReadLine
Skip
SkipLine
Write
WriteLine
WriteBlankLines

 


 
Write
TypeMethod
Return Value TypeNone
Usageobject.Write(String)
DescriptionWrites the specified string to a text file.
ExampleCode:
Set fso = CreateObject("Scripting.FileSystemObject")
filename="c:\test\test.txt"
textvalue="Here is my resume."
Set tso = fso.OpenTextFile(filename,1,false,0)
tso.Write(textvalue)
tso.Close
NotesThe Close method must follow the Write method or the text will not appear in the file.

The Bookworm
Search the Tutorial-Web library for books on any topic!
Sponsors

Search Now:
In Association with Amazon.com