P
Peter Afonin
Hello,
I'm using an Access project to create a table and then to export it to the
text file. Then I need to write three lines of text at the beginning of this
file.
This code works fine for me:
Dim fs As New Scripting.FileSystemObject
Dim ts As TextStream
Set fs = CreateObject("Scripting.FileSystemObject")
Set ts = fs.OpenTextFile("\\Win2000\Everyone\XeroxExport\" & Me.txtForm &
".txt", ForAppending)
ts.WriteLine ("This is a test 1.")
ts.WriteLine ("This is a test 2.")
ts.WriteLine ("This is a test 3.")
The only problem that if I use this code it writes these lines at the end of
the text file, and I need these lines to be at the beginning. What code
should I use?
I would appreciate your help.
Thank you,
I'm using an Access project to create a table and then to export it to the
text file. Then I need to write three lines of text at the beginning of this
file.
This code works fine for me:
Dim fs As New Scripting.FileSystemObject
Dim ts As TextStream
Set fs = CreateObject("Scripting.FileSystemObject")
Set ts = fs.OpenTextFile("\\Win2000\Everyone\XeroxExport\" & Me.txtForm &
".txt", ForAppending)
ts.WriteLine ("This is a test 1.")
ts.WriteLine ("This is a test 2.")
ts.WriteLine ("This is a test 3.")
The only problem that if I use this code it writes these lines at the end of
the text file, and I need these lines to be at the beginning. What code
should I use?
I would appreciate your help.
Thank you,