I am new to text file processing in VB. I am parsing a file that contains many reports. I wish to save each report as a separate text file. What is the syntax for that?
Thanks,
Jeff
Printable View
I am new to text file processing in VB. I am parsing a file that contains many reports. I wish to save each report as a separate text file. What is the syntax for that?
Thanks,
Jeff
I should probably reword this.
After parsing the data I wish to save each report as a separate file. How do I save the text file in a specific directory and save it under a specific name?
If you want to append to the file, replace the Output keyword with the Append keywordCode:Dim FileNum as Integer
Dim FilePath as String
Dim FileName as String
Dim Data as String
Data = "Whatever data you wish to write"
FilePath = "C:\"
FileName = "DataFile1.dat"
FileNum = FreeFile
Open FilePath + FileName For Output as FileNum
Print #FileNum, Data
Close #FileNum
Thanks Finn...