2

MS Word に要件ドキュメントがあり、他の誰かがそれをレビューし、「変更の追跡」機能を使用して見つかった問題のリストを提供するとします。

「レビュー中に見つかったメジャー/マイナーな問題の数」を抽出する方法はありますか? 自動化されたスクリプトを使用して - メトリック目的ですか?

CodeCollaboratorには MS Word が統合さているようですが、Word の内部を調べて追跡された変更データを抽出する方法がわからないようです。ドキュメントを起動するだけです。

4

1 に答える 1

2

コメントを別の文書に抽出する 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
于 2008-12-18T16:47:57.203 に答える