word用VBA快速输入拼音
时间:2023-12-07 14:46:19
输入时输入对应的元音加声调,然后利用VBA统一替换,这样速度快多了。
如:she1ng dia4o
选中后,运行下面的宏就可得到:
shēng diào
对于有时要输入小学语文类的拼音尤其有用。可以考虑把这个宏放到对应的模板中。
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
标签:word用VBA快速输入拼音
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
ppt2007中怎么绘制具有一定角度的角?
2023-01-17 14:19:58
![](https://img.aspxhome.com/file/2023/10/a350036_0s.jpg)
MAC可以批量删除图库照片吗 MAC批量删除图库照片技巧
2022-02-27 09:28:47
![](https://img.aspxhome.com/file/2023/3/a214403_0s.jpg)
excel表格怎么设置提取数字
2022-10-05 22:44:38
Win10系统OneNote如何开启自动同步?
2022-08-14 05:05:10
![](https://img.aspxhome.com/file/2023/28/a243168_0s.jpg)
Win11同步空间图标怎么删除?Win11同步空间图标删除方法步骤
2022-04-25 14:54:14
![](https://img.aspxhome.com/file/2023/1/a275211_0s.jpg)
原地升级!这款第三方工具 Rufus 让你更轻松绕过微软 Win11 系统 TPM 限制要求
2023-08-23 14:42:11
![](https://img.aspxhome.com/file/2023/28/a240766_0s.jpg)
WPS文字中怎么给文章添加水印
2022-12-15 15:19:32
新电脑win11跳过创建账户的方法
2023-03-13 18:53:31
![](https://img.aspxhome.com/file/2023/1/a274629_0s.jpg)
win10电脑录制视频保存在哪?
2023-08-24 20:38:28
![](https://img.aspxhome.com/file/2023/2/a290185_0s.png)
win7系统安装IE10浏览器失败该怎么办?
2022-01-20 21:20:29
![](https://img.aspxhome.com/file/2023/28/a250815_0s.jpg)
Win7旗舰版未安装音频设备怎么办?
2023-07-04 13:54:19
![](https://img.aspxhome.com/file/2023/26/a229388_0s.jpg)
为什么win8.1应用商店打不开 该怎么解决
2022-03-08 16:06:16
![](https://img.aspxhome.com/file/2023/29/a255999_0s.jpg)
word制作作文稿纸的方法大全
2022-12-03 14:57:10
11对战平台无法登陆的解决方法
2022-05-25 14:39:31
![](https://img.aspxhome.com/file/2023/9/a340598_0s.jpg)
如何解决Win7系统Explorer.exe错误的问题?
2022-06-15 09:38:56
![](https://img.aspxhome.com/file/2023/27/a231914_0s.jpg)
win8怎么升级到win9 win8/8.1升级win9图文教程
2023-08-11 11:05:29
![](https://img.aspxhome.com/file/2023/29/a253674_0s.jpg)
腾讯新闻极速版如何赚金币?腾讯新闻极速版赚金币的方法
2022-02-18 23:08:26
![](https://img.aspxhome.com/file/2023/7/a332617_0s.jpg)
excel 制作一个数据透视表,并对其进行差异分析
2022-09-30 09:59:42
![](https://img.aspxhome.com/file/2023/1/a155271_0s.gif)
如何打开WPS文档云同步功能?WPS文档云同步设置教程
2022-06-20 07:49:15
![](https://img.aspxhome.com/file/2023/30/a268324_0s.jpg)
列间距拥挤 如何在WPS文本中设置列间距和修改每行的字符数
2023-10-19 14:21:05
![](https://img.aspxhome.com/file/2023/3/a169783_0s.jpg)