Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a txt file in c:\mydir\mytext.txt
    I want to delete all line in text file do until the code find the value TROVATO in position Mid(linetext, 1,7)

    example:
    textttttttttt
    tetxttxttxt
    textttt
    TROVATO

    in this cae the line to be delete are only the first 3

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If you use the "classic" instructions for working with text files, you can't delete lines. You'd have to open the text file, create a new text file and write only the lines that you want to keep to the new file.

    Another option is to open and manipulate the text file in Word using code.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •