D
DorkyGrin
I'm trying to figure out how to read through a multipage text file for
a
specific string (always in the first 3 columns of a line), then and
add X number of blank lines to make the total page length 20 lines.
There are always 7 lines of text after the string is found. These
lines need to
stay at the bottom of each page.
For example, every time I see the numbers "037", add enough blank
lines to make the total lines of that page = 20
Here a sample file, it is 11 lines long:
***********************************
033 apple asdlksdlkfdkfjlskfjlfs
pear slkdjflksdflkjdfjlksf
grape alskdfsdfdf
orange asdfasdf
037 banana asldkfjasdlk
lkasjdfljka
asdfasdf
asdfasdf
asdfasdf
ksjflkdlj
ljkisdlfkdlfk
**********************************
After running the a vb script, the file should look like this and is
20 lines long:
**********************************
033 apple asdlksdlkfdkfjlskfjlfs
pear slkdjflksdflkjdfjlksf
grape alskdfsdfdf
orange asdfasdf
037 banana asldkfjasdlk
lkasjdfljka
asdfasdf
asdfasdf
asdfasdf
ksjflkdlj
ljkisdlfkdlfk
**********************************
I was thinking of something like this:
1. count number of lines = x
2. 3. 20 - x = YlinesToAdd
4. Find "037:
5. Insert blanklines Y times.
What do you folks think?
Thanks DG
a
specific string (always in the first 3 columns of a line), then and
add X number of blank lines to make the total page length 20 lines.
There are always 7 lines of text after the string is found. These
lines need to
stay at the bottom of each page.
For example, every time I see the numbers "037", add enough blank
lines to make the total lines of that page = 20
Here a sample file, it is 11 lines long:
***********************************
033 apple asdlksdlkfdkfjlskfjlfs
pear slkdjflksdflkjdfjlksf
grape alskdfsdfdf
orange asdfasdf
037 banana asldkfjasdlk
lkasjdfljka
asdfasdf
asdfasdf
asdfasdf
ksjflkdlj
ljkisdlfkdlfk
**********************************
After running the a vb script, the file should look like this and is
20 lines long:
**********************************
033 apple asdlksdlkfdkfjlskfjlfs
pear slkdjflksdflkjdfjlksf
grape alskdfsdfdf
orange asdfasdf
037 banana asldkfjasdlk
lkasjdfljka
asdfasdf
asdfasdf
asdfasdf
ksjflkdlj
ljkisdlfkdlfk
**********************************
I was thinking of something like this:
1. count number of lines = x
2. 3. 20 - x = YlinesToAdd
4. Find "037:
5. Insert blanklines Y times.
What do you folks think?
Thanks DG