Word 2007 extract comments

  • Thread starter Thread starter Donna
  • Start date Start date
D

Donna

In Word 2007, is there a way to extract comments using Line In and Line Out,
and the Balloon Comment feature that will include where the comment came from
and who made the comment? Ideally, the comments would be extracted to a table
listing the above where/who information. Or do we have to extract differently
& combine?
 
Running a macro that contains the following code when the document
containing the comments is the active document will create a new document
containing a table with the comments, the page number on which they appear
and the author's name:

Dim Source As Document, Target As Document
Dim TTable As Table
Dim TRow As Row
Dim acomment As Comment
Set Source = ActiveDocument
Set Target = Documents.Add
Set TTable = Target.Tables.Add(Target.Range, 1, 3)
With TTable.Rows(1)
.Cells(1).Range.Text = "Comment"
.Cells(2).Range.Text = "Page Number"
.Cells(3).Range.Text = "Author"
End With
For Each acomment In Source.Comments
Set TRow = TTable.Rows.Add
TRow.Cells(1).Range.Text = acomment.Range
acomment.Range.Select
TRow.Cells(2).Range.Text = Selection.Information(wdActiveEndPageNumber)
TRow.Cells(3).Range.Text = acomment.Author
Next acomment


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
Back
Top