Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Macro code to delete all comments

    In Word 2010, I want to include a line in a macro to delete all comments in the current document. I tried recording a macro and using the "Delete all comments in document" function on the Review tab, but nothing appeared in the macro. Is there a command that will do this in a macro?

  2. #2
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    The following will delete comments in the main document story:

    Code:
    Sub DeleteComments()
        Dim cm As Comment
        For Each cm In ActiveDocument.Comments
            cm.Delete
        Next
    End Sub

  3. The Following User Says Thank You to richardbarrett For This Useful Post:

    Murgatroyd (2013-12-10)

  4. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Thanks for your reply. I have since discovered the following also.

    Sub DeleteAllComments()
    ActiveDocument.DeleteAllComments
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •