Click to See Complete Forum and Search --> : open file and appending from end of file in API
daylor
Aug 14th, 2000, 02:41 AM
hi.
how can i open file in api(this i know..) AND
start writing text from the END of the file...
'Read
Open "C:\TxtFile.txt" For Input As #1
Text1.Text = Input$(LOF(1), 1)
Close #1
'Save
Open "C:\TxtFile.txt" For Output As #1
Print #1, "Your text here"
Close #1
If you want to save the files and keep everything rather than overwriting it.
Which I believe is what you want to do:
Open "C:\TxtFile.txt" For Append As #1
Print #1, "Your text here"
Close #1
That's not an API method though. If you want to stick to pure API, use WriteFile.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.