Extract Comments and text selected linked with the comment

Anonymous
2014-03-28T18:26:53+00:00

Doug Robins and Cindy Miester provided a wonderful macro to extract comments and line number here: http://answers.microsoft.com/en-us/office/forum/office_2010-word/how-can-i-copy-all-comments-from-a-word-2010/8dd48333-eb48-4f88-b0fc-9721f8e40516

I would like to know if there is a way to modify the code to extract the selected text which usually "anchors" the comment within the text.  In the image below what I need is to extract:

[conceived in Liberty]  [g1][A theme throughout Lincoln's Presidency.]

[so conceived] [g2][Referring to Liberty]

Any help please????

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
{count} votes
Answer accepted by question author
  1. Jay Freedman 206K Reputation points Volunteer Moderator
    2014-03-28T21:55:12+00:00

    Modify the macro that Doug posted, like this:

    Sub x()

        Dim source As Document, target As Document

        Dim i As Long

        Set source = ActiveDocument

        Set target = Documents.Add

        With source

            For i = 1 To .Comments.Count

                target.Range.InsertAfter _

                    "[" & .Comments(i).Scope.Text & "]  [" & _

                    .Comments(i).Initial & "][" & _

                    .Comments(i).Range.Text & "]" & vbCr

            Next i

        End With

    End Sub

    7 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2015-11-29T03:24:15+00:00

    Hi

    I have a VBA routine that prepares a summary table of all the comments and tracked revisions.  It includes the full context in the source document, either the full paragraph or the entire table cell where it was made, and shows the insert or strikethrough deletion in another colour, just like in track changes.

    To clarify, this routine not only extracts the text comments are linked to, but a more complete context, the entire paragraph or the entire table cell.  I found that some people put comments against a single word, so I needed a wider context to interpret the comment with flicking between the documents

    I use this to extract feedback reviewers give on my documents, the table gives a quick overview and I can respond point-by-point to any changes or suggestions very quickly and professionally - there is code in the release notes or you download this routine and others productivity tools for free at DocumentProductivity@blogspot.com.

    0 comments No comments