体验零代码搭建

Excel简体繁体转换的VBA代码

网友投稿  ·  2024-01-24 19:01  ·  云表格  ·  阅读 1938


在Excel中,没有简体和繁体文字之间的转换功能。

在Excel中,没有简体和繁体文字之间的转换功能。

Excel简体繁体转换的VBA代码

但是Word却有此功能,因此,我们可以在Excel中通过VBA代码调用Word的繁体和简体功能,实现在Excel中的简体繁体转换的功能。

下面就是与此相关的VBA代码,希望对你有帮助。

Sub JFZH()

Dim wd As Word.Application

Set wd = New Word.Application

With wd.Documents.Add .Sections(1).Range.Text = Sheet1.Cells(1, 1).Text .Sections(1).Range.Select wd.WordBasic.ToolsSCTCTranslate Direction:=0, Varients:=0, TranslateCommon:=0

wd.WordBasic.ToolsTCSCTranslate Direction:=0, Varients:=0, TranslateCommon:=0 繁体转简体

Sheet1.Cells(1, 1) = .Sections(1).Range.Text .Close False简体转繁体

End With wd.Quit

Set wd = Nothing End Sub


Excel快速移动到最后一行一列 << 上一篇
2024-01-24 19:01
Excel文本框来输入内容 Excel文本框自适应文字内容调整大小
2024-01-24 19:01
下一篇 >>

相关推荐