I have a set of macros that finds specfied characters and prompts the user to replace them with other specified characters; e.g., this one.
Sub ConvertMicronSymbolInNormalFontToGreekLetterMuInSymbolFont()
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(181))
vReplaceText = Array(-3987)
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("Convert this character?", 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 "No matches found.", vbInformation
If k > 0 Or m > 0 Then MsgBox k & " matches converted." & vbCr & _
m & " matches skipped.", vbInformation
Exit Sub
End Sub
The macro works fine, but if a document contains any text boxes, the macro doesn't include them. How can I get the macro to include text boxes?