Wild characters in Find and Replace

  • Thread starter Thread starter Trish
  • Start date Start date
T

Trish

I used to be able to do this in the prior version... not sure how to do it in
my new version. If I have a doc with a list of items that all have a : after
them and the first written character after the two spaces following the colon
is a small letter and I want to replace them with a capital letter, how do I
do that? In the prior version, I used Find :^$ and then "highlight all" and
then used the change case function. In this version, "highlight all" is not
an option. Please advise.
 
Hi Trish,

Once you've input the Find string, click on 'Reading Highlight' and choose 'Highlight All'.
 
Use a macro containing the following code:

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:=": [a-z]", Forward:=True, _
MatchWildcards:=True, Wrap:=wdFindContinue, MatchCase:=False) = True
Selection.Text = Left(Selection.Text, 3) &
UCase(Right(Selection.Text, 1))
Loop
End With


--
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, originally posted via msnews.microsoft.com
 
Back
Top