假设我在MS Word中有一个需求文档,其他人审阅了它,并提供了一个使用“跟踪更改”功能发现的问题列表。
有没有办法提取“在评审过程中发现了多少主要/次要问题?”使用自动化脚本-用于度量目的?
我看到CodeCollaborator集成了一些MS Word,但它似乎不知道如何查看Word内部以提取跟踪的更改数据。它只是启动文档。
发布于 2008-12-18 16:47:57
我曾经写过一个Word宏,将注释提取到一个单独的文档中,欢迎您尝试将其调整为您的目的,如果您有问题,请在此处回复,我可以帮助您进行更改。
Public Sub PROCESS_COMMENTS()
Dim strReplaceText As String
Dim myPar As Paragraph
Dim strCurrentColumn As String
Dim i As Integer
Dim Com As Comment
Application.ScreenUpdating = False
' set the input and output docs.
Set inDoc = ActiveDocument
' check we have comments to process in the original document
If inDoc.Comments.Count < 1 Then
MsgBox "No comments in the document"
Exit Sub
End If
' comments exist so create new document
Set outDoc = Documents.Add
Set outRange = outDoc.Content
outDoc.Range.InsertAfter "List of Comments:"
outDoc.Paragraphs(outDoc.Paragraphs.Count).Style = outDoc.Styles("Heading 1")
outDoc.Range.InsertParagraphAfter
' cycle through comments, inserting them in the new document
' display the new document and refresh
outDoc.Activate
Application.ScreenRefresh
For Each Com In inDoc.Comments
outRange.InsertAfter "[" & Com.Author & " - " & Com.Initial & Com.Index & "] "
outDoc.Paragraphs(outDoc.Paragraphs.Count).Range.Font.Bold = True
outDoc.Range.InsertParagraphAfter
outRange.InsertAfter Com.Range.Text
outDoc.Paragraphs(outDoc.Paragraphs.Count).Range.Font.Bold = False
Set myRange = Com.Scope
outDoc.Range.InsertParagraphAfter
outDoc.Range.InsertParagraphAfter
Next
Application.ScreenUpdating = True
Set outDoc = ActiveDocument
End Subhttps://stackoverflow.com/questions/378425
复制相似问题