Nexan
Wed Apr 06 11:01:07 CDT 2005
That worked perfectly. Thanks!
"Graham Mayor" wrote:
> In that case - as Greg has just told me he is going to a meeting -
>
> Selection.HomeKey Unit:=wdStory
> Selection.Find.ClearFormatting
> Selection.Find.Replacement.ClearFormatting
> With Selection.Find
> '**********************
> .Text = "text" 'put your searched text here
> .Replacement.Text = "^&"
> .Replacement.Font.Underline = True
> .Replacement.Font.Bold = True
> '**********************
> .Forward = True
> .Wrap = wdFindContinue
> .Format = True
> .MatchCase = False
> .MatchWholeWord = False
> .MatchAllWordForms = False
> .MatchSoundsLike = False
> .MatchWildcards = False
> End With
> Selection.Find.Execute replace:=wdReplaceAll
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site
http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> Nexan wrote:
> > Greg,
> >
> > No, it definitely needs to be in macro format, since the action is
> > going to be part of a larger macro.
> >
> > Thanks!
> >
> > "Greg" wrote:
> >
> >> Nexan,
> >>
> >> First, you can do this without a macro with Word's Find and Replace
> >> dialog. Edit>Replace opens the dialog. Type the string in the find
> >> what field. Type ^& in the replace with field. Click
> >> More>Format>Font apply bold and single underline
> >>
> >> Click replace all.
> >>
> >> If you still want a macro, post back.
>
>
>