Re: Help with Macro to Change Font Color
- From: Helmut Weber <nbhymsjxdgcn@xxxxxxxxxxxxxx>
- Date: Sat, 19 Nov 2005 00:03:16 +0100
Hi everybody,
like Tony said (good wildcard pattern):
Sub test0987()
Selection.HomeKey unit:=wdStory
Selection.ExtendMode = False
ResetSearch
With Selection.Find
.Text = "[! *]{1,}\*"
.MatchWildcards = True
.Replacement.Font.Color = wdColorBlue
.Execute replace:=wdReplaceAll
End With
ResetSearch
End Sub
Public Sub ResetSearch()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
.
- References:
- Help with Macro to Change Font Color
- From: James Walker
- Re: Help with Macro to Change Font Color
- From: Tony Jollans
- Help with Macro to Change Font Color
- Prev by Date: Re: Coding help please.
- Next by Date: Re: Coding help please.
- Previous by thread: Re: Help with Macro to Change Font Color
- Next by thread: Re: Help with Macro to Change Font Color
- Index(es):
Relevant Pages
|