叁·分

不求甚解

用户工具

站点工具


tech-notes:export-all-cmts-in-word

导出Word中全部批注

Word 中 Alt+F11,插入模块,粘贴以下 VBA 脚本,运行。活动文档中的全部批注会被放入新的 word 文件中1)

注意,VBA 无法处理批注中的图片,请留意。

Sub exportcomments()
Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document
For Each cmt In ActiveDocument.Comments
s = s & cmt.Index & "|" & cmt.Author & "|" & cmt.Range.Text & "|" & cmt.Date & vbCr
Next
Set doc = Documents.Add
doc.Range.Text = s
End Sub

其他拓展可见 https://docs.microsoft.com/en-us/office/vba/api/word.comment

tech-notes/export-all-cmts-in-word.txt · 最后更改: 2022/06/27 09:12 由 Librarian

除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Noncommercial-Share Alike 4.0 International
CC Attribution-Noncommercial-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki