Share via

Export Comments and Tracked Changes

Anonymous
2014-03-20T21:49:59+00:00

Is there a way to export comments and changes from a document that has tracked changes?  (I know I can print just the comments, but I actually need them in table format).

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2014-09-16T15:23:56+00:00

    Thanks, this worked for me. I copied the macro you provided and then saved it in the macros in my document, gave it a name and then ran it. I was able to save it into excel & word.

    Was this answer helpful?

    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2014-03-21T02:54:34+00:00

    Use a macro containing the following code:

    Dim DocSource As Document, DocTarget As Document

    Dim tbl As Table

    Dim arev As Revision

    Dim acomment As Comment

    Dim i As Long

    Dim strType As String

    Set DocSource = ActiveDocument

    Set DocTarget = Documents.Add

    Set tbl = DocTarget.Tables.Add(Selection.range, 2, 3)

    With tbl

        .Cell(1, 1).range.text = "Author"

        .Cell(1, 2).range.text = "Type"

        .Cell(1, 3).range.text = "Text"

    End With

    i = 2

    With DocSource

        For Each arev In .Revisions

            tbl.Cell(i, 1).range.text = arev.Author

            Select Case arev.Type

                Case 1

                    strType = "Insertion"

                Case 2

                    strType = "Deletion"

                End Select

            tbl.Cell(i, 2).range.text = strType

            tbl.Cell(i, 3).range.text = arev.range.text

            tbl.Rows.Add

            i = i + 1

        Next arev

        For Each acomment In .Comments

            tbl.Cell(i, 1).range.text = acomment.Author

            tbl.Cell(i, 2).range.text = "Comment"

            tbl.Cell(i, 3).range.text = acomment.range.text

            tbl.Rows.Add

            i = i + 1

        Next acomment

    End With

    DocTarget.Activate

    If there are other types of revisions in which you are interested, expand on the Select Case -  End Select construction by including the required entries from the wdRevisionType Enumeration:

    WdRevisionType Enumeration

    Specifies the type of a change that is marked with a revision mark.

    Name Value Description
    wdNoRevision 0 No revision.
    wdRevisionConflict 7 Revision marked as a conflict.
    wdRevisionDelete 2 Deletion.
    wdRevisionDisplayField 5 Field display changed.
    wdRevisionInsert 1 Insertion.
    wdRevisionParagraphNumber 4 Paragraph number changed.
    wdRevisionParagraphProperty 10 Paragraph property changed.
    wdRevisionProperty 3 Property changed.
    wdRevisionReconcile 6 Revision marked as reconciled conflict.
    wdRevisionReplace 9 Replaced.
    wdRevisionSectionProperty 12 Section property changed.
    wdRevisionStyle 8 Style changed.
    wdRevisionStyleDefinition 13 Style definition changed.
    wdRevisionTableProperty 11 Table property changed.
    wdRevisionCellDeletion 17 Table cell deleted.
    wdRevisionCellInsertion 16 Table cell inserted.
    wdRevisionCellMerge 18 Table cells merged.
    wdRevisionMovedFrom 14 Content moved from.
    wdRevisionMovedTo 15 Content moved to.

    Was this answer helpful?

    0 comments No comments