kerrypnx
4/27/2018 - 7:20 AM

检查错误字符-2018-4-27

检查错误字符-2018-4-27

Sub delectSymbol(ByVal control As IRibbonControl)
Dim i As Integer
Dim krt, krt1, pnx, pnx1
krt = "61549,61537,61538,61540,61541,61542,61543,61544,61546,61547,61548,61521,61553,61550,61560,61552,61555,61556,61557,61559,61561,61562,61527"
krt1 = "μ,α,β,δ,ε,φ,γ,η,?,κ,λ,Θ,θ,ν,ξ,π,σ,τ,υ,ω,ψ,ζ,Ω"
pnx = Split(krt, ",")
pnx1 = Split(krt1, ",")
For i = LBound(pnx) To UBound(pnx)
    With selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ChrW(pnx(i))
        .Replacement.Font.name = "Palatino Linotype"
        .Replacement.Text = pnx1(i)
        .Wrap = wdFindContinue
        
        
        .MatchWildcards = False
        Do
        .Execute
        If Not .Found Then
        Exit Do
        End If
        If .Found Then
            If InputBox("Is Symbol? Repleace?", "Symbol", "yes", 300, 300) = "yes" Then
                selection.Range.Font.name = "Palatino Linotype"
                selection.Text = pnx1(i)
                
                selection.collapse wdCollapseEnd
            End If
        End If
        Loop
    End With
Next i

With selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ChrW(61526)
        .Replacement.Font.name = "Palatino Linotype"
        .Replacement.Text = ChrW(962)
        .Wrap = wdFindContinue
        
        
        .MatchWildcards = False
        Do
        .Execute
        If Not .Found Then
        Exit Do
        End If
        If .Found Then
            If InputBox("Is Symbol? Repleace?", "Symbol", "yes", 300, 300) = "yes" Then
                    .Execute Replace:=wdReplaceOne
                selection.collapse wdCollapseEnd
            End If
        End If
        Loop
    End With
End Sub