My 2 cents... While Tony's answer is correct, using the search function is MUCH
faster and easier than any other method. If you can think of a good reason not
to use it, I'd like to hear about it.
On Thu, 28 Feb 2008 00:00:13 -0000, "Tony Jollans"
>Without using (built-in) search functionality you will have to write your
>own - checking each paragraph (using any algorithm you like) until you
>identify the one you want.
>
>Having identified the paragraph you can scan it and move the selection
>within it using Selection.MoveUntil and Selection.MoveEndUntil and other
>similar methods.
>
>--
>Enjoy,
>Tony
>
>"Alan Stancliff"
>news:eDX4fgZeIHA.5400@TK2MSFTNGP04.phx.gbl...
>> Here's a Word 2003 VBA question about RANGEs that's been driving me nuts
>> for a while.
>>
>> Supposing I have a document that somewhere has the following on a line by
>> itself, effectively being a paragraph:
>>
>> **********
>> (A) MY SAMPLE WORDS TO SELECT: Hello World
>>
>> and later on it has a line that has
>>
>> (B) MY OTHER SAMPLE WORDS TO SELECT: Hello Universe, So Vast Thou Art.
>> *********
>>
>> Without using the search functionality, how would one code to do the
>> following three tasks:
>> 1. Select the the stuff following the colon and two spaces in sample (A),
>> whatever it may be (in this case, "Hello World")
>>
>> 2. Select the stuff before the comma in my example (B), whatever it may be
>> (in this case it is Hello Universe)
>>
>> 3 Select the stuff between the comma and end of the line (in this case, it
>> is "So Vast Thou Art").
>>
>>
>> Regards,
>>
>> Alan
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.