Posts: 17
Threads: 5
Joined: Oct 2009
Reputation:
0
03-05-2010, 06:21 AM
Hi All,
I know how to create a text file and how to write in them. Is there any way to update them? i mean not to overwrite the file but to add another lines?
Please help.
Thanks,
Ajit
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
03-05-2010, 12:05 PM
Yes, Open your file in append mode instead of write mode.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
03-05-2010, 02:14 PM
you have not defined 'ForAppending' anywhere in the code
add 'ForAppending = 8' this line at top. or
use below statement -
Set tf = fso.OpenTextFile("c:\testfile.txt", 8, True)
Posts: 17
Threads: 5
Joined: Oct 2009
Reputation:
0
03-08-2010, 05:32 AM
Great Saket. It worked. but what was the reason of not running of the old line?
Thanks,
Ajit