Yes, it's possible, but the processing would be time-consuming in a large document, since every string of Y paragraphs or Z characters must be checked.
Consider a document with 10 paragraphs with Y = 5. That's 6 separate checks (i.e. you need n-y+1 checks, where n = number of paragraphs). And that's just for one word. Do empty paragraphs count?
With the inter-character separation, you'd need to find every occurrence and count the characters between them. Do tabs, paragraph breaks, punctuation, etc. count as characters?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|