Copy comments

  • Thread starter Thread starter chen
  • Start date Start date
C

chen

I have a word document and I need to copy all the comments inserted to a new
document.
 
The following macro should do that:

Sub ExtractComments()
Dim DocA As Document
Dim DocB As Document
Dim comm As Variant
Dim Count As Long
Dim sComment As String
Set DocA = ActiveDocument
Set DocB = Word.Documents.Add
Count = 1
For Each comm In DocA.Comments
sComment = DocA.Comments(Count).Range.Text
sComment = "(" & DocA.Comments(Count).Initial & Count & ") " & sComment
DocB.Activate
Selection.TypeText sComment & vbCr
Count = Count + 1
Next comm
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.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

Back
Top