Macro for comments extract

R

Raphael Goubet

Hi,

Does anybody have a kind of macro to extract comments in the current
document to another new document?

I'm just too lazy to write one myself. :)

Raphael
 
R

Raphael Goubet

OK, I wasn't that lazy after all. If someone's interrested:

Sub ExtractComments()
Dim DocName, CommentDocName, CurrentComment As String
Dim MyComment As Object

DocName = ActiveDocument.Name
CommentDocName = Left(DocName, 8) & "_Comments.doc"
Documents.Add
ActiveDocument.SaveAs (CommentDocName)

For Each MyComment In Documents(DocName).Comments

CurrentComment = MyComment.Range
Documents(CommentDocName).Paragraphs.Add.Range = CurrentComment &_
vbCrLf

Next MyComment

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