如何批量生成没有音标的拼音,将词语批量添加没有音标的拼音?有网友提到这样的问题
下面实例是取得汉字笔画和拼音及根据拼音首字母查询
取得函数笔画函数:
Option Compare Database
Public Function NoStrokes(Tstr As String) As Long
Dim i As Long
i = Asc(Tstr)
' 1划
If i = &HA440 Or i = &HA441 Then NoStrokes = 1
' 2划
If (i >= &HA442 And i <= &HA453) Or (i >= &HC940 And i <= &HC944) Then NoStrokes = 2
' 3划
If (i >= &HA454 And i <= &HA47E) Or (i >= &HC945 And i <= &HC94C) Then NoStrokes = 3
' 4划
If (i >= &HA4A1 And i <= &HA4FD) Or (i >= &HC94D And i <= &HC962) Then NoStrokes = 4
' 5划
If (i >= &HA4FE And i <= &HA5DF) Or (i >= &HC963 And i <= &HC9AA) Then NoStrokes = 5
' 6划
If (i >= &HA5E0 And i <= &HA6E9) Or (i >= &HC9AB And i <= &HCA59) Then NoStrokes = 6
' 7划
If (i >= &HA6EA And i <= &HA8C2) Or (i >= &HCA5A And i <= &HCBB0) Then NoStrokes = 7
' 8划
If i = &HA260 Or (i >= &HA8C3 And i <= &HAB44) Or (i >= &HCBB1 And i <= &HCDDC) Then NoStrokes = 8
' 9划
If i = &HA259 Or i = &HF9DA Or (i >= &HAB45 And i <= &HADBB) Or (i >= &HCDDD And i <= &HD0C7) Then NoStrokes = 9
' 10划
If i = &HA25A Or (i >= &HADBC And i <= &HB0AD) Or (i >= &HD0C8 And i <= &HD44A) Then NoStrokes = 10
' 11划
If i = &HA25B Or i = &HA25C Or (i >= &HB0AE And i <= &HB3C2) Or (i >= &HD44B And i <= &HD850) Then NoStrokes = 11
' 12划
If i = &HF9DB Or (i >= &HB3C3 And i <= &HB6C2) Or (i >= &HD851 And i <= &HDCB0) Then NoStrokes = 12
' 13划
If i = &HA25D Or i = &HA25F Or i = &HC6A1 Or i = &HF9D6 Or i = &HF9D8 Or (i >= &HB6C3 And i <= &HB9AB) Or (i >= &HDCB1 And i <= &HE0EF) Then NoStrokes = 13
' 14划
If i = &HF9DC Or (i >= &HB9AC And i <= &HBBF4) Or (i >= &HE0F0 And i <= &HE4E5) Then NoStrokes = 14
' 15划
If i = &HA261 Or (i >= &HBBF5 And i <= &HBEA6) Or (i >= &HE4E6 And i <= &HE8F3) Then NoStrokes = 15
' 16划
If i = &HA25E Or i = &HF9D7 Or i = &HF9D9 Or (i >= &HBEA7 And i <= &HC074) Or (i >= &HE8F4 And i <= &HECB8) Then NoStrokes = 16
' 17划
If (i >= &HC075 And i <= &HC24E) Or (i >= &HECB9 And i <= &HEFB6) Then NoStrokes = 17
' 18划
If (i >= &HC24F And i <= &HC35E) Or (i >= &HEFB7 And i <= &HF1EA) Then NoStrokes = 18
' 19划
If (i >= &HC35F And i <= &HC454) Or (i >= &HF1EB And i <= &HF3FC) Then NoStrokes = 19
' 20划
If (i >= &HC455 And i <= &HC4D6) Or (i >= &HF3FD And i <= &HF5BF) Then NoStrokes = 20
' 21划
If (i >= &HC4D7 And i <= &HC56A) Or (i >= &HF5C0 And i <= &HF6D5) Then NoStrokes = 21
' 22划
If (i >= &HC56B And i <= &HC5C7) Or (i >= &HF6D6 And i <= &HF7CF) Then NoStrokes = 22
' 23划
If (i >= &HC5C8 And i <= &HC5F0) Or (i >= &HF7D0 And i <= &HF8A4) Then NoStrokes = 23
' 24划
If (i >= &HC5F1 And i <= &HC654) Or (i >= &HF8A5 And i <= &HF8ED) Then NoStrokes = 24
' 25划
If (i >= &HC655 And i <= &HC664) Or (i >= &HF8EE And i <= &HF96A) Then NoStrokes = 25
' 26划
If (i >= &HC665 And i <= &HC66B) Or (i >= &HF96B And i <= &HF9A1) Then NoStrokes = 26
' 27划
If (i >= &HC66C And i <= &HC675) Or (i >= &HF9A2 And i <= &HF9B9) Then NoStrokes = 27
' 28划
If (i >= &HC676 And i <= &HC678) Or (i >= &HF9BA And i <= &HF9C5) Then NoStrokes = 28
' 29划
If (i >= &HC679 And i <= &HC67C) Or (i >= &HF9C7 And i <= &HF9CB) Then NoStrokes = 29
' 30划
If i = &HC67D Or (i >= &HF9CC And i <= &HF9CF) Then NoStrokes = 30
' 30划
If i = &HC67D Or (i >= &HF9CC And i <= &HF9CF) Then NoStrokes = 30
' 31划
If i = &HF9D0 Then NoStrokes = 31
' 32划
If i = &HC67E Or i = &HF9D1 Then NoStrokes = 32
' 33划
If i = &HF9C6 Or i = &HF9D2 Then NoStrokes = 33
' 35划
If i = &HF9D3 Then NoStrokes = 35
' 36划
If i = &HF9D4 Then NoStrokes = 36
' 48划
If i = &HF9D5 Then NoStrokes = 48
End Function