Advice in printing Comments, please?

E

Ed

I am using Word XP (2002). I wanted a printout of all the comments inserted
by the reviewer. I did CTRL+P and selected List of Markup. I'm getting all
the comments, plus all the Deletions and Insertions. Also, everything is
listed as being on "Page 1". Is there a way to get just the Comments, and
what page number the comment is actually on?

Thank you.
Ed
 
E

Ed

Not finding any other method, I created a macro to select each Comment, grab
the text of the entire line the comment mark resides in and the page number,
and write them to a new Word document which is then saved. The macro works,
though I'm sure it could use some refinements, should anyone else care.

Ed

Sub GetAllComments()

Dim cmt As Comment
Dim strCmt As String
Dim strAll As String
Dim doc As Document
Dim strDocName As String

strAll = "Comments in " & ActiveDocument.Name & vbCr & vbCr
strDocName = ActiveDocument.Path
strDocName = strDocName & "\Comments_" & Format(Date, "ddmmmyy") & "_" &
Format(Time, "hhmm") & ".doc"

For Each cmt In ActiveDocument.Comments
cmt.Reference.Select
Selection.MoveStart Unit:=wdLine, Count:=-1
Selection.MoveEnd Unit:=wdLine, Count:=1
Selection.MoveEnd Unit:=wdCharacter, Count:=-1
strCmt = Selection.Text
Selection.Collapse wdCollapseStart
strAll = strAll & "On Page " & _
cmt.Reference.Information(wdActiveEndAdjustedPageNumber) & _
" is the text:" & vbCr & strCmt & vbCr & _
"with the following comment:" & vbCr & cmt.Range.Text & _
vbCr & "************" & vbCr
Next cmt

Set doc = Application.Documents.Add
With doc.PageSetup
.RightMargin = InchesToPoints(0.5)
.LeftMargin = InchesToPoints(0.5)
.TopMargin = InchesToPoints(0.5)
.BottomMargin = InchesToPoints(0.5)
End With
doc.Content.Text = strAll
doc.SaveAs FileName:=strDocName

End Sub
 

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