Word 2007 extract comments

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?
 
D

Doug Robbins - Word MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top