Delete Comment Macro?

J

Jean-Guy Marcil

ML was telling us:
ML nous racontait que :
Is there an easy way to delete all comments fro ma document via a
macro?

If you want to iterate the comment collection and check them out first, try
this:

'_______________________________________
Dim myComment As Comment

For Each myComment In ActiveDocument.Comments
'If Check something
myComment.Delete
'Else do nothing or something else
'End If
Next
'_______________________________________

Else, in one fell swoop:

WordBasic.DeleteAllCommentsInDoc


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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