让我们说我有在MS Word需求文档,和别人评论它的提供使用“修订”功能发现的问题的列表。

有没有一种方法来提取“多少主要/次要问题审查过程中发现?”使用自动化脚本 - 吗?度量目的

我看到 CodeCollaborator 有一定的MS Word集成,但它似乎不知道如何往里Word中提取修订数据。它只是启动文档。

有帮助吗?

解决方案

我曾经写提取评论到一个单独的文档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 Sub
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top