myrange.End = myrange.Paragraphs(1).Range.End - 1
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"Alan Stancliff"
news:47C77313.3090707@nojunkyahoo.com...
> Thanks Doug,
>
> I'll be sure to play with that as soon as I get off work.
>
> In the lines that say:
> myrange.Start = myrange.start + InStr(myrange, ",")
> myrange.End = myrange.Paragraphs(1).Range.End
>
> That includes everything from the comma to the paragraph marker, including
> the marker. How would I alter that second line to include everything up to
> the paragraph marker but not the paragraph marker itself?
>
> Regards,
>
> Alan Stancliff
>
> Doug Robbins - Word MVP wrote:
>> You make use of the Instr() command to determine the amount by which the
>> .Start of the Range (myrange) must be used and then set the .End of the
>> Range to the .End of the Range of the Paragraph
>>
>> Dim myrange As Range
>> Set myrange = ActiveDocument.Range
>> myrange.start = myrange.start + InStr(myrange, "MY OTHER SAMPLE
>> WORDS
>> TO SELECT") + 32
>> myrange.Start = myrange.start + InStr(myrange, ",")
>> myrange.End = myrange.Paragraphs(1).Range.End
>> MsgBox myrange.Text
>>