Here you go just change the path to where you want the file.
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Const TristateFalse = 0
Const TristateTrue = -1
Const TristateUseDefault = -2
Dim title
Dim paragraph
Dim afile
Dim ts
Dim fs
title = "Writing to File"
paragraph = inputbox("enter your text"
Set fs = CreateObject("Scripting.FileSystemObject"
' open file to write to, create if not there, using ASCII
afile ="Your path to file"
Set ts = fs.OpenTextFile(afile, 8 , -1)
ts.WriteLine title
ts.WriteBlankLines(1)
ts.WriteLine paragraph
ts.Close
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.