A bevy of thanks to the two of you!
Mark and Paul thank you for your assistance in this matter.
It is greatly appreaciated.
Interestingly, neither of the macros worked, initially.
One, likely important facet I failed to mention (as I did not know it would make a difference) and is the likely culprit for the failure to work as desired was that the 3 paragraphs that I am attempting to replace with 2 are at the end of the header.
However, both macros worked when I made substitutions (^p^p for ^p^p^p and ^p for ^p^p in Mark's code and "[^13]{2,}", ReplaceWith:="^p" in Paul's code). That is when I replaced two paragraph marks with one.
However, that does not technically solve my initial problem as some of the documents may have only 2 paragraph marks in the header and if I use the adulterated code above it would mess those documents up.
So what I should have asked from the beginning is: Is there a means to check for 3 paragraphs when they are the last 3 entries in a header?
|