Delete Resolved Comments Only

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

a map "locator pin" styled as the MS Word logo
For more on macros, see Part Four in the book (sections 28 to 31). For more on working with Modern Comments, see section 4. And for best practices for file names and version control, see section 13.

Follow these instructions to get the few lines of code into your Word software:

  1. Copy the lines of code below into your computer’s clipboard (e.g., ctrl + C does this).
  2. Open any Word document, even a new blank page.
  3. Click the Macros icon on the View ribbon and select View Macros to open the list of macros on your computer.
  4. Click the Edit button to open the VBE/VBA code window. (See note.*)
  5. Scroll to the end of the window, press enter to start a new line, then paste the code!
  6. 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 Comment

   For indx = ActiveDocument.Comments.Count To 1 Step -1
      Set cmt = ActiveDocument.Comments(indx)
      If cmt.Done Then cmt.DeleteRecursively
   Next indx
End Sub

Jay Freedman

Run the macro to delete all “resolved” comment threads

  1. Open the file that you want to delete “resolved” comments from.
  2. Click the Macros icon on the View ribbon and select View Macros to open the list of macros on your computer.
  3. Select the macro from the alphabetical list.
  4. Click Run.
  5. 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!

Share this post

Leave a Reply