瀏覽量:23次
輸入時輸入對應(yīng)的元音加聲調(diào),然后利用VBA統(tǒng)一替換,這樣速度快多了。
如:she1ng dia4o
選中后,運(yùn)行下面的宏就可得到:
shēng diào
對于有時要輸入小學(xué)語文類的拼音尤其有用??梢钥紤]把這個宏放到對應(yīng)的模板中。
VBA代碼如下:
Dim findarr, replacearr
Dim i As Long
Application.ScreenUpdating = False
findarr = Array("a1", "a2", "a3", "a4", _
"o1", "o2", "o3", "o4", _
"e1", "e2", "e3", "e4", _
"i1", "i2", "i3", "i4", _
"u1", "u2", "u3", "u4", _
"v1", "v2", "v3", "v4")
replacearr = Array("ā", "á", "ǎ", "à", _
"ō", "ó", "ǒ", "ò", _
"ē", "é", "ě", "è", _
"ī", "í", "ǐ", "ì", _
"ū", "ú", "ǔ", "ù", _
"ǖ", "ǘ", "ǚ", "ǜ")
For i = 0 To UBound(findarr)
With Selection.Find
.Execute findarr(i), MatchWildcards:=False, Format:=False, replacewith:=replacearr(i), Replace:=wdReplaceAll
End With
Next
Application.ScreenUpdating = True
End Sub
[聲明]本網(wǎng)轉(zhuǎn)載網(wǎng)絡(luò)媒體稿件是為了傳播更多的信息,此類稿件不代表本網(wǎng)觀點,本網(wǎng)不承擔(dān)此類稿件侵權(quán)行為的連帶責(zé)任。故此,如果您發(fā)現(xiàn)本網(wǎng)站的內(nèi)容侵犯了您的版權(quán),請您的相關(guān)內(nèi)容發(fā)至此郵箱【779898168@qq.com】,我們在確認(rèn)后,會立即刪除,保證您的版權(quán)。
官網(wǎng)優(yōu)化
整站優(yōu)化
渠道代理
400-655-5776