Ich habe folgendes Problem.
Mit dem untenstehendem Code kopiere Zeile um Zeile in ein neu generiertes Textfile.
In meinem neuen Textfile ist jede Linie zwischen einem Anführungszeichen.
z.B. "MEIN LINIENTEXT"
was kann ich machen damit nur MEIN LINIENTEXT steht??
gruss
tobias
Sub CreateNewTextFile()
Dim strLineText As String
Dim strPath As String
Dim strExtractName As String
Dim strTempNewFileName As String
Dim Location
Dim intFileCounter As Integer
On Error GoTo SOS
strPath = "C:\temp\"
strExtractName = "security_extract.sec"
strTempNewFileName = "security_file.txt"
intFileCounter = 2
CreateObject("Scripting.FileSystemObject").CreateTextFile (strPath & strTempNewFileName)
Open strPath & strExtractName For Input Access Read Lock Read As #1
Open strPath & strTempNewFileName For Output Access Write Lock Read As #intFileCounter
Do While Location < LOF(1)
Location = Loc(1)
Write #intFileCounter, strLineText
Line Input #1, strLineText
Loop
Close #1, #intFileCounter
SOS:
Close #1, #intFileCounter
Exit Sub
End Sub