I have now made a Macro #4 based on Macro #2, with different characters to find and replace.
Sub Macro4()
Dim vFindText As Variant
Dim vReplaceText As Variant
Dim oRng As Range
Dim i As Integer, j As Integer, k As Integer, m As Integer
Dim lAsk As Long
vFindText = Array(Chr(176), Chr(186), Chr(111))
vReplaceText = Array(-3920, -3920, -3920)
j = 0: k = 0: m = 0
For i = 0 To UBound(vFindText)
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = vFindText(i)
Do While .Execute
j = j + 1
oRng.Select
lAsk = MsgBox("Replace Symbol", vbYesNoCancel)
If lAsk = 2 Then GoTo lbl_Exit
If lAsk = 6 Then
k = k + 1
oRng.InsertSymbol Font:="Symbol", _
CharacterNumber:=vReplaceText(i), _
Unicode:=True
Else
m = m + 1
End If
oRng.Collapse 0
Loop
End With
Next i
lbl_Exit:
If j = 0 Then MsgBox "There are no matches", vbInformation
If k > 0 Or m > 0 Then MsgBox k & " substitutions made" & vbCr & _
m & " substitutions skipped", vbInformation
Exit Sub
End Sub
This version should find the degree symbol [Chr(176)], the masculine ordinal indicator [Chr(186)], and the letter o [Chr(111)] when it has superscript font formatting, and replace them all with the degree symbol inserted from the Symbol font. How do I specify the superscript font formatting for only the letter o; i.e., only the third item in the find array? (Can this be done by using an additional array to specify font formatting for each item in the find array; e.g., in this case "any" for the first and second items, and "superscript" for the third item?)