OK, I found what I was looking for - with many thanks to Graham Mayor.
I have amended some code on his website and done the following:
Sub DateAbbrevItalicize()
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
Do While .Execute(findText:="(c.", _
MatchWildcards:=False, _
Wrap:=wdFindStop, _
Forward:=True) = True
'Do what you want with the found text (Selection.Range)
'In this case format the second character as italicized
Selection.Range.Characters(2).Font.Italic = True
Loop 'and look for the next match
End With
End With
End Sub
Quote:
Originally Posted by Jedumi
mmmm...
That didn't quite come out the way I wanted it. It was supposed to only show the 'c' in italics and the rest in not-italics.
|