As we get used to working with Modern Comments, best practices will emerge and fewer snafus will occur, we hope. For now, I’m finding those who aren’t fully indoctrinated yet are confused by seeing resolved comments, not to mention that they make outstanding queries harder to spot amid the clutter. This post explains how to get rid of only the resolved comments without clicking Delete thread on every single one.
The resolved threads sometimes become visible without biding, and Word doesn’t have a way to delete all resolved threads from a document the way that the Delete all comments button works. This is solved with a tiny macro, provided here.
Adding the macro
Follow these instructions to get the few lines of code into your Word software:
- Copy the lines of code below into your computer’s clipboard (e.g., ctrl + C does this).
- Open any Word document, even a new blank page.
- Click the Macros icon on the View ribbon and select View Macros to open the list of macros on your computer.
- Click the Edit button to open the VBE/VBA code window. (See note.*)
- Scroll to the end of the window, press enter to start a new line, then paste the code!
- Click the floppy-disk save icon at the top of the VBE/VBA window, then close the whole window (not just the code part).
*There are many approaches to adding macros. This one requires the least explanation, surprisingly.
The code:
Sub DeleteResolvedComments()
Dim indx As Long
Dim cmt As CommentFor indx = ActiveDocument.Comments.Count To 1 Step -1
—Jay Freedman
Set cmt = ActiveDocument.Comments(indx)
If cmt.Done Then cmt.DeleteRecursively
Next indx
End Sub
Run the macro to delete all “resolved” comment threads
- Open the file that you want to delete “resolved” comments from.
- Click the Macros icon on the View ribbon and select View Macros to open the list of macros on your computer.
- Select the macro from the alphabetical list.
- Click Run.
- Save the file with a new name (as the “live” copy, one step closer to publication). But don’t call it “final”! LOL
Troubleshooting
When the macro selection window opens, be sure to drag it on top of the file you want it to run in before running the macro. For some reason, MS thought it would be useful to let dialog windows act on whichever file they’re visually on top of rather than the one they were opened from.
Restart Word to make sure the macro is saved in the template. You may want to back up the macros or save them in a template besides “normal”, which gets overwritten when Word glitches from time to time. See the book for more instructions.
Macro code cannot accommodate the slightest error. Even an extra space can invalidate it. See Part Four in the book (sections 28 to 31) for more on creating and refining macros.
If the macro won’t run or prevents all macros from running, reopen the VBA and delete these lines of code. Refer to the book for more solutions.
Got a gnarly Word problem? Submit your problem and we’ll try to answer it in the Q&A thread.
Learn with us! Join a course today.
© This blog and all materials in it are copyright Adrienne Montgomerie on the date of publication. All rights reserved. No portion may be stored or distributed without express written permission. Asking is easy!