eiSecure: The following code will work with single instances of the ~BEGIN and ~END tags, but it doesn't work with multiple instances (but you should be able to add it in if you play around with it for a bit).
VB Code:
Dim sFile As String Dim saFile() As String Dim strText As String Open "MyFile.txt" For Input As #1 sFile = Input(LOF(1), 1) Close #1 saFile = Split(sFile, vbCrLf) For y = 0 To UBound(saFile) If Trim$(saFile(y)) = "~BEGIN" Then For x = y To UBound(saFile) If Trim$(saFile(x)) = "~END" Then For Z = y + 1 To x - 1 strText = strText & saFile(Z) & vbCrLf Next Z strText = strText & vbCrLf End If Next x End If Next y Text1 = strText




Reply With Quote