Public Function HzToSpell(Hz As String) As String '生成简拚
Dim slen, xx As Integer
Dim high, low, i As Long
Dim Ss1, Ss2 As String
Ss2 = Hz
slen = Len(Ss2)
If slen = 0 Then
HzToSpell = ""
Exit Function
End If
For xx = 1 To slen
i = 65535 + Asc(Mid(Hz, xx)) + 1
If i >= 45217 And i < 45253 Then
Ss1 = Ss1 + "A"
End If
If i >= 45253 And i < 45761 Then
Ss1 = Ss1 + "B"
End If
If i >= 45761 And i < 46318 Then
Ss1 = Ss1 + "C"
End If
If i >= 46318 And i < 46826 Then
Ss1 = Ss1 + "D"
End If
If i >= 46826 And i < 47010 Then
Ss1 = Ss1 + "E"
End If
If i >= 47010 And i < 47297 Then
Ss1 = Ss1 + "F"
End If
If i >= 47297 And i < 47614 Then
Ss1 = Ss1 + "G"
End If
If i >= 47614 And i < 48119 Then
Ss1 = Ss1 + "H"
End If
If i >= 48119 And i < 49062 Then
Ss1 = Ss1 + "J"
End If
If i >= 49062 And i < 49324 Then
Ss1 = Ss1 + "K"
End If
If i >= 49324 And i < 49896 Then
Ss1 = Ss1 + "L"
End If
If i >= 49896 And i < 50371 Then
Ss1 = Ss1 + "M"
End If
If i >= 50371 And i < 50614 Then
Ss1 = Ss1 + "N"
End If
If i >= 50614 And i < 50622 Then
Ss1 = Ss1 + "O"
End If
If i >= 50622 And i < 50906 Then
Ss1 = Ss1 + "P"
End If
If i >= 50906 And i < 51387 Then
Ss1 = Ss1 + "Q"
End If
If i >= 51387 And i < 51446 Then
Ss1 = Ss1 + "R"
End If
If i >= 51446 And i < 52218 Then
Ss1 = Ss1 + "S"
End If
If i >= 52218 And i < 52698 Then
Ss1 = Ss1 + "T"
End If
If i >= 52698 And i < 52980 Then
Ss1 = Ss1 + "W"
End If
If i >= 52980 And i < 53689 Then
Ss1 = Ss1 + "X"
End If
If i >= 53689 And i < 54481 Then
Ss1 = Ss1 + "Y"
End If
If i >= 54481 And i < 55290 Then
Ss1 = Ss1 + "Z"
End If
If (Asc(Mid(Hz, xx)) >= 97 And Asc(Mid(Hz, xx)) <= 122) Or (Asc(Mid(Hz, xx)) >= 65 And Asc(Mid(Hz, xx)) <= 90) Then
Ss1 = Ss1 + Mid(Hz, xx, 1)
End If
Next
HzToSpell = Ss1
End Function
Dim slen, xx As Integer
Dim high, low, i As Long
Dim Ss1, Ss2 As String
Ss2 = Hz
slen = Len(Ss2)
If slen = 0 Then
HzToSpell = ""
Exit Function
End If
For xx = 1 To slen
i = 65535 + Asc(Mid(Hz, xx)) + 1
If i >= 45217 And i < 45253 Then
Ss1 = Ss1 + "A"
End If
If i >= 45253 And i < 45761 Then
Ss1 = Ss1 + "B"
End If
If i >= 45761 And i < 46318 Then
Ss1 = Ss1 + "C"
End If
If i >= 46318 And i < 46826 Then
Ss1 = Ss1 + "D"
End If
If i >= 46826 And i < 47010 Then
Ss1 = Ss1 + "E"
End If
If i >= 47010 And i < 47297 Then
Ss1 = Ss1 + "F"
End If
If i >= 47297 And i < 47614 Then
Ss1 = Ss1 + "G"
End If
If i >= 47614 And i < 48119 Then
Ss1 = Ss1 + "H"
End If
If i >= 48119 And i < 49062 Then
Ss1 = Ss1 + "J"
End If
If i >= 49062 And i < 49324 Then
Ss1 = Ss1 + "K"
End If
If i >= 49324 And i < 49896 Then
Ss1 = Ss1 + "L"
End If
If i >= 49896 And i < 50371 Then
Ss1 = Ss1 + "M"
End If
If i >= 50371 And i < 50614 Then
Ss1 = Ss1 + "N"
End If
If i >= 50614 And i < 50622 Then
Ss1 = Ss1 + "O"
End If
If i >= 50622 And i < 50906 Then
Ss1 = Ss1 + "P"
End If
If i >= 50906 And i < 51387 Then
Ss1 = Ss1 + "Q"
End If
If i >= 51387 And i < 51446 Then
Ss1 = Ss1 + "R"
End If
If i >= 51446 And i < 52218 Then
Ss1 = Ss1 + "S"
End If
If i >= 52218 And i < 52698 Then
Ss1 = Ss1 + "T"
End If
If i >= 52698 And i < 52980 Then
Ss1 = Ss1 + "W"
End If
If i >= 52980 And i < 53689 Then
Ss1 = Ss1 + "X"
End If
If i >= 53689 And i < 54481 Then
Ss1 = Ss1 + "Y"
End If
If i >= 54481 And i < 55290 Then
Ss1 = Ss1 + "Z"
End If
If (Asc(Mid(Hz, xx)) >= 97 And Asc(Mid(Hz, xx)) <= 122) Or (Asc(Mid(Hz, xx)) >= 65 And Asc(Mid(Hz, xx)) <= 90) Then
Ss1 = Ss1 + Mid(Hz, xx, 1)
End If
Next
HzToSpell = Ss1
End Function