View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_3_] Robert Crandal[_3_] is offline
external usenet poster
 
Posts: 161
Default Extract paragraphs from text file (Got it!)

"GS" wrote:

I must be missing something because in my tests of my sample code I got 3
separate paragraphs in my array, 0 thru 2. I'm not sure you realize that
no matter how you look at it, each whole paragraph is handled as a whole
paragraph. So...

vData(0) contains paragraph1
vData(1) contains paragraph2
vData(2) contains paragraph3


Guess what? You were right! My data file was NOT structured
*exactly* as I posted. I fixed the problem and now it works.

In reality, my source input file is going to be huge, containing a couple
hundred paragraphs. I will be doing search and replace operations
on each paragraph located in vData(n), so I hope this doesn't run
slowly after storing an entire document in a single variable.

Do you think I will be better off reading each line, one at time,
and append each sentence to a string variable until it encounters
the star * border? That way, only one paragraph at a time is loaded
into an array or string or vData??

Thanks again for being such a great help!