vbscript or program to print part of a text file
Posted on 2005-03-03
I have several thousand .txt files that I would like to print only part of. I would like to print the file only up to the word "[COMMENTS]". I would like to be able to select the file from a list, and then just by clicking the selected file, I would like the print program to print the file up to "[COMMENTS]" without opening it in notepad. Currently, we have to open each file, then cut and paste the part we need and then print it. I found a vbscript command "notepad.exe /p " & strFilePath that will print the whole file, but how can I get it to stop at "[COMMENTS]"? Is it possible to do in visual basic?