T
tllcvg
Hi,
Is there a way to set a Range for each section of a document that has a
given Style?
While I can easily set a Range that encompasses all text of a given style
and change the all of the text of that one style to a different style, I have
some additional textual changes that need to be made to each individual set
of lines of the initial style beyond simply changing the text style.
I have documents that will contain blocks of text of a defined Style (for
example, Style1). Each document will have a different number of blocks/lines
of this style and they will be scattered throughout the document in different
places for each document.
I want to have a macro that will accomplish the following:
1) change the style to another style (Style2). (Already can do this globally)
2) Change the text of the first line of each section of the first style to a
predefined text constant.
3) Remove the text from each contiguous line of text of that style while
leaving the same number of blank lines in the second style for each section.
If I could create Ranges for each section of Style1 text, it shouldn't be
hard to identify the number of lines in the section, replace the text in the
first line, and remove the text while leaving the line for the remaining
lines -- right?
Thank you, in advance, for your help with this.
Luke
Is there a way to set a Range for each section of a document that has a
given Style?
While I can easily set a Range that encompasses all text of a given style
and change the all of the text of that one style to a different style, I have
some additional textual changes that need to be made to each individual set
of lines of the initial style beyond simply changing the text style.
I have documents that will contain blocks of text of a defined Style (for
example, Style1). Each document will have a different number of blocks/lines
of this style and they will be scattered throughout the document in different
places for each document.
I want to have a macro that will accomplish the following:
1) change the style to another style (Style2). (Already can do this globally)
2) Change the text of the first line of each section of the first style to a
predefined text constant.
3) Remove the text from each contiguous line of text of that style while
leaving the same number of blank lines in the second style for each section.
If I could create Ranges for each section of Style1 text, it shouldn't be
hard to identify the number of lines in the section, replace the text in the
first line, and remove the text while leaving the line for the remaining
lines -- right?
Thank you, in advance, for your help with this.
Luke