Can anyone help me delimit text files by " "? I have searched the forums but have nto yet found anyone delimiting to pull out each word. I want to pull out each separate word of a text file. Any help would be greatly appreciated. Thank you.
VB Code:
Private Sub Command1_Click() Dim str As String Dim lines() As String Open "C:\file.txt" For Input As #1 str = Input(LOF(1), #1) lines = Split(str, vbNewLine) For N = LBound(lines) To UBound(lines) word = Split(lines, " ") Next N Close #1 For N = LBound(newText) To UBound(newText) str = str & newText(N) Next N Open "C:\newFile.txt" For Output As #2 Print #2, str Close #2 End Sub




Reply With Quote