{"id":19036189,"url":"https://github.com/tx7do/docx-pinyin","last_synced_at":"2026-02-13T07:06:36.363Z","repository":{"id":112433607,"uuid":"568874886","full_name":"tx7do/docx-pinyin","owner":"tx7do","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-22T16:50:23.000Z","size":5791,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-14T14:58:01.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"VBA","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tx7do.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-21T15:41:55.000Z","updated_at":"2022-11-22T15:22:07.000Z","dependencies_parsed_at":"2023-05-15T02:45:17.547Z","dependency_job_id":null,"html_url":"https://github.com/tx7do/docx-pinyin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tx7do/docx-pinyin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fdocx-pinyin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fdocx-pinyin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fdocx-pinyin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fdocx-pinyin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tx7do","download_url":"https://codeload.github.com/tx7do/docx-pinyin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fdocx-pinyin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29398157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T21:53:41.020Z","updated_at":"2026-02-13T07:06:36.349Z","avatar_url":"https://github.com/tx7do.png","language":"VBA","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 如何在Word文档中批量添加汉字注音\r\n\r\n所谓的汉字注音，就是给汉字上方加注拼音。\r\n\r\n![汉字注音](/assets/images/office/pinyin.jpeg)\r\n\r\n在Office里面，这个功能叫做 **“拼音指南”（Phonetic Guide）**。\r\n\r\n![拼音指南](/assets/images/office/pinyinzhinan.jpeg)\r\n\r\n拼音指南一次只能够处理最多30个字，一篇文章不可能只有30个字，上百个字是很正常的，人工处理就会很累。所以，需要做到自动化，做到自动化有两种方式可以做到：\r\n\r\n1. 调用Office的功能；\r\n2. 直接修改docx文档。\r\n\r\n## 调用Office的功能\r\n\r\n调用Office的功能又有两个途径：\r\n\r\n1. VBA；\r\n2. .net。\r\n\r\n其实，这两种途径最终都是调用的Office提供的API。\r\n\r\n### VBA\r\n\r\n我查过了VBA的资料，总共有3个API可用：\r\n\r\n1. [FormatPhoneticGuide](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/1ecf33cf-3601-45f0-89fb-0ab824739343)\r\n2. [Range.PhoneticGuide method (Word)](https://learn.microsoft.com/en-us/office/vba/api/word.range.phoneticguide)\r\n3. [Application.GetPhonetic method (Excel)](https://learn.microsoft.com/en-us/office/vba/api/excel.application.getphonetic)\r\n\r\n网上最多的用是第一种，使用`FormatPhoneticGuide`宏，我试过是能用的，但是存在着一个很大的问题：它不能够定制拼音的样式。而且，相对来说不够稳定。\r\n\r\n```vba\r\n'Word批量使用默认样式加注拼音\r\nSub BatchAddPinYinByDefaultStyle()\r\n    On Error Resume Next\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.EndKey\r\n    For i = TextLength To 0 Step -30\r\n        If i \u003c 30 Then\r\n            Selection.MoveLeft Unit:=wdCharacter, Count:=i\r\n            Selection.MoveRight(Unit:=wdCharacter, Count:=i,Extend:=wdExtend)\r\n        Else\r\n            Selection.MoveLeft Unit:=wdCharacter, Count:=30\r\n            Selection.MoveRight(Unit:=wdCharacter, Count:=30,Extend:=wdExtend)\r\n        End If\r\n        SendKeys \"{Enter}\"\r\n        Application.Run \"FormatPhoneticGuide\"\r\n    Next\r\n    Selection.WholeStory\r\nEnd Sub\r\n```\r\n\r\n另外还有一个清除注音的方法，用到了第二个API：\r\n\r\n```vba\r\n'Word批量清除拼音\r\nSub CleanPinYin()\r\n    Application.ScreenUpdating = False\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1\r\n    For i = 0 To TextLength\r\n        With Selection\r\n             .Range.PhoneticGuide Text:=\"\"\r\n        End With\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n    Next\r\n    Selection.WholeStory\r\n    Application.ScreenUpdating = True\r\nEnd Sub\r\n```\r\n\r\n这一个API既可以清除注音，也可以标明注音。只需要给Text赋值拼音即可。这个API好在可以定制拼音的样式，麻烦的是需要自己去计算出拼音，本来是找到了一个计算拼音的内置方法：`GetPhonetic`，但是，它只存在于Excel里面，在Word里边无法进行调用。\r\n\r\n要实现内置的`GetPhonetic`，我在网上看到有两种实现方法：\r\n\r\n1. 自行实现的VBA，但是实现不够完整：\u003chttps://github.com/StinkCat/CH_TO_PY\u003e\r\n2. 利用golang写了一个RestFull服务器提供服务，然后提供给VBA调用：\u003chttps://github.com/yangjianhua/go-pinyin\u003e\r\n\r\n我们来讨论第二种方法，比较灵活。\r\n\r\n首先是golang的拼音计算服务：\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"flag\"\r\n\t\"fmt\"\r\n\t\"strconv\"\r\n\r\n\t\"github.com/gin-gonic/gin\"\r\n\t\"github.com/mozillazg/go-pinyin\"\r\n)\r\n\r\nvar a pinyin.Args\r\n\r\nfunc initPinyinArgs(arg int) { // arg should be pinyin.Tone, pinyin.Tone1, pinyin.Tone2, pinyin.Tone3, see go-pinyin doc\r\n\ta = pinyin.NewArgs()\r\n\ta.Style = arg\r\n}\r\n\r\nfunc getPinyin(c *gin.Context) {\r\n\than := c.DefaultQuery(\"han\", \"\")\r\n\tp := pinyin.Pinyin(han, a)\r\n\r\n\tc.JSON(200, gin.H{\"code\": 0, \"data\": p})\r\n}\r\n\r\nfunc getPinyinOne(c *gin.Context) {\r\n\than := c.DefaultQuery(\"han\", \"\")\r\n\tp := pinyin.Pinyin(han, a)\r\n\ts := \"\"\r\n\r\n\tif len(p) \u003e 0 {\r\n\t\ts = p[0][0]\r\n\t}\r\n\r\n\tc.JSON(200, gin.H{\"code\": 0, \"data\": s})\r\n}\r\n\r\nfunc allowCors() gin.HandlerFunc {\r\n\treturn func(c *gin.Context) {\r\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Origin\", \"*\")\r\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Credentials\", \"true\")\r\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Headers\", \"Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With\")\r\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Methods\", \"POST, OPTIONS, GET, PUT, DELETE\")\r\n\t\tif c.Request.Method == \"OPTIONS\" {\r\n\t\t\tc.AbortWithStatus(204)\r\n\t\t\treturn\r\n\t\t}\r\n\t\tc.Next()\r\n\t}\r\n}\r\n\r\nfunc main() {\r\n\t// init pinyin output format\r\n\tinitPinyinArgs(pinyin.Tone)\r\n\r\n\tfmt.Print(\"\\n\\nDEFAULT PORT: 8080, USING '-port portnum' TO START ANOTHER PORT.\\n\\n\")\r\n\r\n\tport := flag.Int(\"port\", 8080, \"Port Number, default 8080\")\r\n\tflag.Parse()\r\n\tsPort := \":\" + strconv.Itoa(*port)\r\n\r\n\t// using gin as a web output\r\n\tr := gin.Default()\r\n\tr.Use(allowCors())\r\n\tr.GET(\"/pinyin\", getPinyin) // Call like GET http://localhost:8080/pinyin?han=我来了\r\n\tr.GET(\"/pinyin1\", getPinyinOne)\r\n\tr.Run(sPort)\r\n}\r\n```\r\n\r\n接着，我们来封装自己的`GetPhonetic`：\r\n\r\n```vba\r\n'从Json字符串中提取data字段的数据\r\nFunction getDataFromJSON(s As String) As String\r\n    With CreateObject(\"VBScript.Regexp\")\r\n        .Pattern = \"\"\"data\"\":\"\"(.*)\"\"\"\r\n        getDataFromJSON = .Execute(s)(0).SubMatches(0)\r\n    End With\r\nEnd Function\r\n\r\n'使用http组件调用拼音转换服务获取拼音字符\r\nFunction GetPhonetic(strWord As String) As String\r\n    Dim myURL As String\r\n    Dim winHttpReq As Object\r\n\r\n    Set winHttpReq = CreateObject(\"WinHttp.WinHttpRequest.5.1\")\r\n\r\n    myURL = \"http://localhost:8080/pinyin1\"\r\n    myURL = myURL \u0026 \"?han=\" \u0026 strWord\r\n\r\n    winHttpReq.Open \"GET\", myURL, False\r\n    winHttpReq.Send\r\n\r\n    GetPhonetic = getDataFromJSON(winHttpReq.responseText)\r\nEnd Function\r\n\r\n'测试GetPhonetic方法\r\nSub testGetPhonetic()\r\n    ret = GetPhonetic(\"汗\")\r\n    MsgBox ret\r\nEnd Sub\r\n```\r\n\r\n判定字符是否中文的方法：\r\n\r\n```vba\r\n'判断传入的Unicode是否为中文字符\r\nFunction isChinese(uniChar As Integer) As Boolean\r\n    isChinese = uniChar \u003e= 19968 Or uniChar \u003c 0\r\nEnd Function\r\n```\r\n\r\n最后组装生成拼音注音的VBA脚本：\r\n\r\n```vba\r\n'Word批量拼音注音\r\nSub BatchAddPinYin()\r\n    Application.ScreenUpdating = False\r\n    Dim SelectText As String\r\n    Dim PinYinText As String\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1\r\n    For i = 0 To TextLength\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n        Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend\r\n        With Selection\r\n            SelectText = .Text'基准文字\r\n            If isChinese(AscW(SelectText)) Then'判断是否为中文字符\r\n                PinYinText = GetPhonetic(SelectText)'基准文字 转换为 拼音文字\r\n                If PinYinText \u003c\u003e \"\" Then\r\n                    .Range.PhoneticGuide _\r\n                        Text:=PinYinText, _'拼音文本\r\n                        Alignment:=wdPhoneticGuideAlignmentCenter, _'对齐方式, see: https://learn.microsoft.com/en-us/office/vba/api/word.wdphoneticguidealignmenttype\r\n                        Raise:=0, _'偏移量（磅）\r\n                        FontSize:=10, _'字号（磅）\r\n                        FontName:=\"等线\"'字体\r\n                End If\r\n            End If\r\n        End With\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n    Next\r\n    Selection.WholeStory\r\n    Application.ScreenUpdating = True\r\nEnd Sub\r\n```\r\n\r\n根据golang服务代码的提供者所说，它比较明显的缺点是对多音字的处理不如Word原来的拼音指南，所以需要后期进行手工校正。\r\n\r\n后期校正肯定是必须的，就好比古文里边还有一些通假字，发音是不一样的，这个，我想哪怕是拼音指南也做不好的吧。\r\n\r\n完整的BAS文件如下：\r\n\r\n```vba\r\n'判断传入的Unicode是否为中文字符\r\nFunction isChinese(uniChar As Integer) As Boolean\r\n    isChinese = uniChar \u003e= 19968 Or uniChar \u003c 0\r\nEnd Function\r\n\r\n'从Json字符串中提取data字段的数据\r\nFunction getDataFromJSON(s As String) As String\r\n    With CreateObject(\"VBScript.Regexp\")\r\n        .Pattern = \"\"\"data\"\":\"\"(.*)\"\"\"\r\n        getDataFromJSON = .Execute(s)(0).SubMatches(0)\r\n    End With\r\nEnd Function\r\n\r\n'使用http组件调用拼音转换服务获取拼音字符\r\nFunction GetPhonetic(strWord As String) As String\r\n    Dim myURL As String\r\n    Dim winHttpReq As Object\r\n\r\n    Set winHttpReq = CreateObject(\"WinHttp.WinHttpRequest.5.1\")\r\n\r\n    myURL = \"http://localhost:8080/pinyin1\"\r\n    myURL = myURL \u0026 \"?han=\" \u0026 strWord\r\n\r\n    winHttpReq.Open \"GET\", myURL, False\r\n    winHttpReq.Send\r\n\r\n    GetPhonetic = getDataFromJSON(winHttpReq.responseText)\r\nEnd Function\r\n\r\n'测试GetPhonetic方法\r\nSub testGetPhonetic()\r\n    ret = GetPhonetic(\"汗\")\r\n    MsgBox ret\r\nEnd Sub\r\n\r\n'Word批量拼音注音\r\nSub BatchAddPinYin()\r\n    Application.ScreenUpdating = False\r\n    Dim SelectText As String\r\n    Dim PinYinText As String\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1\r\n    For i = 0 To TextLength\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n        Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend\r\n        With Selection\r\n            SelectText = .Text'基准文字\r\n            If isChinese(AscW(SelectText)) Then'判断是否为中文字符\r\n                PinYinText = GetPhonetic(SelectText)'基准文字 转换为 拼音文字\r\n                If PinYinText \u003c\u003e \"\" Then\r\n                    .Range.PhoneticGuide _\r\n                        Text:=PinYinText, _'拼音文本\r\n                        Alignment:=wdPhoneticGuideAlignmentCenter, _'对齐方式, see: https://learn.microsoft.com/en-us/office/vba/api/word.wdphoneticguidealignmenttype\r\n                        Raise:=0, _'偏移量（磅）\r\n                        FontSize:=10, _'字号（磅）\r\n                        FontName:=\"等线\"'字体\r\n                End If\r\n            End If\r\n        End With\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n    Next\r\n    Selection.WholeStory\r\n    Application.ScreenUpdating = True\r\nEnd Sub\r\n\r\n'Word批量使用默认样式加注拼音\r\nSub BatchAddPinYinByDefaultStyle()\r\n    Application.ScreenUpdating = False\r\n    On Error Resume Next\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.EndKey\r\n    For i = TextLength To 0 Step -30\r\n        If i \u003c= 30 Then\r\n            Selection.MoveLeft Unit:=wdCharacter, Count:=i\r\n            SelectText = Selection.MoveRight(Unit:=wdCharacter, Count:=i,Extend:=wdExtend)\r\n        Else\r\n            Selection.MoveLeft Unit:=wdCharacter, Count:=30\r\n            SelectText = Selection.MoveRight(Unit:=wdCharacter, Count:=30,Extend:=wdExtend)\r\n        End If\r\n        SendKeys \"{Enter}\"\r\n        Application.Run \"FormatPhoneticGuide\"\r\n    Next\r\n    Selection.WholeStory\r\n    Application.ScreenUpdating = True\r\nEnd Sub\r\n\r\n'Word批量清除拼音注音\r\nSub CleanPinYin()\r\n    Application.ScreenUpdating = False\r\n    Selection.WholeStory\r\n    TextLength = Selection.Characters.Count\r\n    Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1\r\n    For i = 0 To TextLength\r\n        With Selection\r\n             .Range.PhoneticGuide Text:=\"\"\r\n        End With\r\n        Selection.MoveRight Unit:=wdCharacter, Count:=1\r\n    Next\r\n    Selection.WholeStory\r\n    Application.ScreenUpdating = True\r\nEnd Sub\r\n```\r\n\r\n### .net\r\n\r\n它其实也是调用的Office的API，这个跟VBA调用API没有本质上的区别，是一样的。\r\n\r\nVS2022需要安装：**Visual Studio Tools for Office（VSTO）**\r\n\r\n然后，在项目当中引用程序集：**Microsoft.Office.Interop.Word** ，VS2022有14和15版本。\r\n\r\n我本机的是Office16，而vs2022并没有提供相关的程序集，所以我没有办法使用，也就没有做进一步的探索了。\r\n\r\n我查文档在`Microsoft.Office.Interop.Word`命名空间下，有一个[Range.PhoneticGuide](https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.range.phoneticguide?view=word-pia)方法，接口看起来跟VBA调用的差不多，使用上应该也是差不太多的。\r\n\r\n## 直接修改docx文档\r\n\r\ndocx的文档本质上是一个经过了zip压缩的[OpenXML](https://en.wikipedia.org/wiki/Office_Open_XML)文档。\r\n\r\n基本上，主流的办公软件都支持这样一个标准：微软Office、苹果iWork、WPS Office、Google Docs。\r\n\r\n拼音指南在Office Open XML中的类型名是：`CT_Ruby`。\r\n\r\nRuby，Wiki百科中解释为：注音，或称注音标识、加注音、标拼音、拼音指南。\r\n\r\n文档可见于：\r\n\r\n- \u003chttps://schemas.liquid-technologies.com/OfficeOpenXML/2006/?page=ct_ruby.html\u003e\r\n- \u003chttps://learn.microsoft.com/zh-cn/dotnet/api/documentformat.openxml.wordprocessing.rubyproperties?view=openxml-2.8.1\u003e\r\n\r\n我稍微研究了下，拼音指南的节点：`\u003cw:ruby\u003e`。\r\n\r\n其下面有若干个子节点：\r\n\r\n1. `\u003cw:rubyPr\u003e`是拼音指南的样式，\r\n2. `\u003cw:rt\u003e`是拼音指南的拼音文字，\r\n3. `\u003cw:rubyBase\u003e`是拼音指南的基准文字。\r\n\r\n一个比较完整的拼音指南的XML是这样的：\r\n\r\n```xml\r\n\u003cw:ruby\u003e\r\n    \u003cw:rubyPr\u003e\r\n        \u003cw:rubyAlign w:val=\"center\"/\u003e\r\n        \u003cw:hps w:val=\"26\"/\u003e\r\n        \u003cw:hpsRaise w:val=\"50\"/\u003e\r\n        \u003cw:hpsBaseText w:val=\"52\"/\u003e\r\n        \u003cw:lid w:val=\"zh-CN\"/\u003e\r\n    \u003c/w:rubyPr\u003e\r\n    \u003cw:rt\u003e\r\n        \u003cw:r w:rsidR=\"00002ED0\" w:rsidRPr=\"00002ED0\"\u003e\r\n            \u003cw:rPr\u003e\r\n                \u003cw:rFonts w:ascii=\"等线\" w:eastAsia=\"等线\" w:hAnsi=\"等线\"/\u003e\r\n                \u003cw:color w:val=\"333333\"/\u003e\r\n                \u003cw:sz w:val=\"26\"/\u003e\r\n                \u003cw:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"FFFFFF\"/\u003e\r\n            \u003c/w:rPr\u003e\r\n            \u003cw:t\u003ediǎn\u003c/w:t\u003e\r\n        \u003c/w:r\u003e\r\n    \u003c/w:rt\u003e\r\n    \u003cw:rubyBase\u003e\r\n        \u003cw:r w:rsidR=\"00002ED0\"\u003e\r\n            \u003cw:rPr\u003e\r\n                \u003cw:rFonts w:ascii=\"华文楷体\" w:eastAsia=\"华文楷体\" w:hAnsi=\"华文楷体\"/\u003e\r\n                \u003cw:color w:val=\"333333\"/\u003e\r\n                \u003cw:sz w:val=\"52\"/\u003e\r\n                \u003cw:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"FFFFFF\"/\u003e\r\n            \u003c/w:rPr\u003e\r\n            \u003cw:t\u003e点\u003c/w:t\u003e\r\n        \u003c/w:r\u003e\r\n    \u003c/w:rubyBase\u003e\r\n\u003c/w:ruby\u003e\r\n```\r\n\r\n## 参考资料\r\n\r\n- [Office_Open_XML - WikiPedia](https://en.wikipedia.org/wiki/Office_Open_XML)\r\n- [求解MacroName:=\"FormatPhoneticGuide\" '运行拼音指南 在vba中的初始化方法](https://club.excelhome.net/thread-1631691-1-1.html)\r\n- [获取汉字拼音函数GetPhonetic的问题](https://club.excelhome.net/thread-859213-1-1.html)\r\n- [有没有给大批量中文加拼音的宏？](https://club.excelhome.net/thread-1553265-1-1.html)\r\n- [Word批量加注拼音/清除拼音](https://club.excelhome.net/thread-1520031-1-1.html)\r\n- [Add pinyin to all text using MS word.](https://github.com/wuzhuoqing/alltextphonetic)\r\n- [VBA实践+word快速全文加拼音](https://zhuanlan.zhihu.com/p/164457464)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftx7do%2Fdocx-pinyin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftx7do%2Fdocx-pinyin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftx7do%2Fdocx-pinyin/lists"}