Using two fonts
Cooz,
I haven't dug into the inconsistencies wrt the range [A-z] processing
the six characters your test revealed. Still I think it better to
process as much of a document in bulk as possible and then go back and
sort out the cats and dogs. Perhaps something like:
Sub TTF2()
Dim oRng As Word.Range
Dim myArray As Variant
Dim i As Long
Set oRng = ActiveDocument.Content
With oRng.Find
.MatchWildcards = True
.Text = "[A-z]"
.Replacement.Text = "^&"
.Replacement.Font.Name = "Arial"
.Execute Replace:=wdReplaceAll
End With
myArray = Split("`,[,],^,_,\", ",")
For i = 0 To UBound(myArray)
With oRng.Find
.MatchWildcards = False
.Text = myArray(i)
.Replacement.Text = "^&"
.Replacement.Font.Name = "Times New Roman"
.Execute Replace:=wdReplaceAll
End With
Next i
End Sub
|