Greg:
Thanks for your reply. I'm not sure what you mean by "why ... looping" - perhaps the way I stated it is confusing. My macro simply moves through the Word doc one line/paragraph at a time (using Set pgphRange = ActiveDocument.Paragraphs(variable).Range), checks each line (contained in pgphRange) for certain text, processes (formats, outputs, saves) text if it meets certain requirements (or does nothing if the text does not meet those requirements), and goes to the next line/paragraph. [Upon reflection, I guess that does not really constitute "cycling" or "looping" - I apologize for being unclear].
Originally, I was incrementing "variable" (in the term above) to access the next line/paragraph, but that was what got me into trouble. Now I just replace "variable" with "1", and delete each line/paragraph as I finish with it. The whole thing is encased in a "Do ... Until no more lines/paragraphs" loop.
I can't post the code since the data is proprietary, and part of it would be exposed by the code.
Hope this clears things up.
|