
October 25th, 2005, 05:48 AM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 11
Time spent in forums: 5 h 28 m 18 sec
Reputation Power: 0
|
|
append new text line to text file
I want to open a txt file through my access database and append a line to it. When I use the opentextfile method for appending but it always appends my new text line to the end of the last line. I want it to append the new text to a new line. I have tried object.skipline but this is not supported when appending?
This is what I get:
"oldline" "newline"
but I want:
"oldline"
"newline"
Here is my code
sub ConcatenateTxtFile ()
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fd.OpenTextFile(dpath, ForAppending)
'Need a line here to skip to next line
f.writeline ("newline")
End Sub
|