Writing text in next line
-
Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions
-
Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions
put a 'vbCrLf' (=enter) before you're text to write File.AppendAllText("My file path", vbcrlf & text to write) My.Computer.FileSystem.WriteAllText("My file path", vbcrlf & Text to write, True) should work
-
put a 'vbCrLf' (=enter) before you're text to write File.AppendAllText("My file path", vbcrlf & text to write) My.Computer.FileSystem.WriteAllText("My file path", vbcrlf & Text to write, True) should work
Thank you very much its working dude.
-
Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions
you can also use following statement File.AppendAllText("My file path", Controlchars.newline & text to write) My.Computer.FileSystem.WriteAllText("My file path", Controlchars.newline & Text to write, True)
Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India)