Group: microsoft.public.word.vba.general
From: "Graham Mayor"
Date: Monday, March 03, 2008 3:43 AM
Subject: Re: In Word 2003, a macro that reads screen size and cursor position

Now guess who looks foolish? :o)

However the macro does work on the second paragraph. Switch on the
formatting marks CTRL+* and make sure you have the required number of
paragraph marks to ensure that it is the second paragraph you are checking.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Alan Stancliff wrote:
> Hi Graham,
>
> Thanks for the quick response.
>
> Surely the phrase "the quick brown fox" contains the word "brown."
>
> It looked to me as if Shauna's code is meant to replace the word
> "brown" with "pink."
>
> I still don't get the point.
>
> Regards,
>
> Alan Stancliff
>
>
> Graham Mayor wrote:
>> If you are taking the code literally, then of course it won't do
>> anything as the quick brown fox text doesn't contain the word
>> 'brown'. Change the word 'brown' to 'fox'
>> i.e.
>> .Text = "brown"
>> to
>> .Text = "fox"
>>
>> and the macro should replace each occurrence of 'fox' in the second
>> paragraph i.e.
>>
>> ActiveDocument.Paragraphs(2).Range


Safety Articles | Usenet Groups | Usenet News | Bluegrass