Hack 36 Delete All Comments in a Document![]() ![]() Reviewing toolbar that deletes all the comments in a document. For users of earlier versions of Word, this hack does the same thing.Comments let one or more reviewers comment on the text of a document without interfering with the content of the document. But once you finish editing or reviewing a document, getting rid of those comments can be a hassle.To quickly delete a single comment, right-click its reference and choose Delete Comment from the shortcut menu [Hack #3]. But if you're facing dozens or hundreds of comments, deleting each one in turn will take you quite a while.Another method for deleting comments is to use Find and Replace. Select Edit Reference style. (Don't see the Format button? Click the More button to make it visible.)Leave the Replace With box empty.Click the Replace All button.But occasionally some comments just won't go quietly, so a VBA macro is your best bet for quickly getting rid of them. 4.11.1 The CodePlace this macro in the template of your choice [Hack #50] and either run it from the Tools dialog or put a button for it on a menu or toolbar [Hack #1] : Sub DeleteAllCommentsIf you're concerned about running the macro unintentionally, perhaps because you've placed it on a toolbar near another command you use frequently, the following version includes a prompt asking you to confirm that you do indeed want all the comments deleted, as shown in Figure 4-19. It also pops up a message when it finishes, notifying you how many comments were removed. Sub DeleteAllCommentsAndConfirm( ) Figure 4-19. Confirming that you want to delete all comments in a document![]() |