E
Ed
A report generated by an old database program dumps everything out in one
long continuous file. That can not be changed. The resulting text file is
opened in Word, and the users run a macro I wrote that finds the first line
of each new record in the report and inserts a page break, so each new
record begins on a new page. All runs well - until someone changes that
first line! It's hard-coded into the macro as the string for "Find.Text =
strFind". Then, of course, it's my macro that's broke!
The header for each new record in the report has four lines. Each line is a
separate paragraph. Each line will report the same item of information,
such as:
ITEM NO: SER NO:
COLOR: BIN NO:
The information at each label may or may not change, but these labels will
remain fixed at their character positions in each line at each report
header. (For instance, whether COLOR: is "blue" or "chartreuse", the BIN
NO: label will always be at the same character position.)
Is there an easy way to tell the macro to "find three or four paragraphs
with these labels at these character positions", while disregarding whatever
information may be presented at the label?
Ed
long continuous file. That can not be changed. The resulting text file is
opened in Word, and the users run a macro I wrote that finds the first line
of each new record in the report and inserts a page break, so each new
record begins on a new page. All runs well - until someone changes that
first line! It's hard-coded into the macro as the string for "Find.Text =
strFind". Then, of course, it's my macro that's broke!
The header for each new record in the report has four lines. Each line is a
separate paragraph. Each line will report the same item of information,
such as:
ITEM NO: SER NO:
COLOR: BIN NO:
The information at each label may or may not change, but these labels will
remain fixed at their character positions in each line at each report
header. (For instance, whether COLOR: is "blue" or "chartreuse", the BIN
NO: label will always be at the same character position.)
Is there an easy way to tell the macro to "find three or four paragraphs
with these labels at these character positions", while disregarding whatever
information may be presented at the label?
Ed