MS Word: How to delete all the comments in a document using Visual Basic for Applications (VBS)
I just got passed a document with a Microsoft Word document with a zillion comments in it. I could have deleted all the comments by hand, but it would have taken forever and there would be a good chance I would miss one. So I used Visual Basic for Applications to do it. Here are the steps:
- In MS Word, type Alt-F11 to bring up the Macro window
- At the bottom of the Macro window, there is a pane labelled "Immediate". Commands entered here are run immediately.
- On a single line in the immediate pane, type
for z = ActiveDocument.Comments.Count to 1 step -1: ActiveDocument.Comments(z).Delete : next - Hit Enter. All of the comments in the document will be deleted.
No comments:
Post a Comment
I moderate comments blog posts over 14 days old. This keeps a lot of spam away. I generally am all right about moderating. Thanks for understanding.