工作上有需求,能不能批量导出word里的批注,最好能将批注增加的段落的页码、内容也导出来,求推荐相关插件或软件。
vba即可. 自己写一个宏.
大意代码如下:
Sub 宏3()
Dim comm As Comment
Dim str As String
For Each comm In ActiveDocument.Comments
str = str + comm.Range.Text + Chr(13)
Next comm
MsgBox (str)
End Sub
你可以根据自己实际情况, 修改 MsgBox ,我这里演示为弹窗显示
狗尾续貂,加上段落页码、内容:
Sub 宏3()
Dim comm As Comment
Dim rng As Range
Dim str As String
Dim n As Integer
n = 1
For Each comm In ActiveDocument.Comments
Set rng = comm.Reference.Paragraphs(1).Range
str = str & "批注" & Format(n, "000") & ":" & comm.Range.Text & Chr(13) _
& "所在页码:" & rng.Information(wdActiveEndPageNumber) & Chr(13) _
& "批注文本:" & rng.Text & Chr(13)
n = n + 1
Next comm
MsgBox (str)
End Sub