If you have a Word document with dozens or hundreds of tracked comments from a review period, manually resolving each one is time-consuming and error-prone. Word does not include a built-in one-click command to resolve all comments older than a chosen date. This article explains how to use a simple VBA macro to bulk-resolve comments based on a cutoff date you define, saving you significant editing time.
Key Takeaways: Automating Comment Resolution by Date
- VBA macro customizing the Comment.Date property: Lets you filter comments inserted before a specific date and resolve them in one batch.
- Macro security settings in File > Options > Trust Center > Trust Center Settings > Macro Settings: Must be set to enable all macros or digitally signed macros before the script runs.
- Quick Access Toolbar or keyboard shortcut (Alt+F8): Provides fast access to run the macro without opening the VBA editor each time.
How Word Stores Comments and the Date Property
Each comment in a Word document is stored as a Comment object in the VBA object model. The object includes a Date property that records the exact timestamp when the comment was inserted. Word also provides a Resolve method that marks a comment as resolved, which hides it from the default comments list but does not delete it. By writing a short VBA macro that loops through all comments, checks the Date property against a cutoff date, and calls the Resolve method on matching comments, you can bulk-resolve older comments in seconds.
To run a VBA macro, you need to enable macro support in Word. The macro described in this article does not modify any document content other than the comment status. Before you start, ensure your document is saved in a macro-enabled format (.docm) if you plan to keep the macro attached to the document.
Steps to Create and Run the Bulk-Resolution Macro
- Open the VBA editor
Press Alt+F11 on your keyboard. This opens the Microsoft Visual Basic for Applications window. - Insert a new module
In the Project Explorer pane on the left, right-click your document name (or Normal for global use) and choose Insert > Module. A blank code window appears. - Paste the macro code
Copy and paste the following code into the module window:Sub ResolveCommentsOlderThanDate()
Dim c As Comment
Dim cutoffDate As Date
cutoffDate = DateSerial(2024, 6, 1) ' change to your cutoff date
For Each c In ActiveDocument.Comments
If c.Date < cutoffDate Then
c.Resolve
End If
Next c
End Sub
ReplaceDateSerial(2024, 6, 1)with your desired cutoff date. The format isDateSerial(year, month, day). - Run the macro
Press Alt+F8 to open the Macro dialog box. Select ResolveCommentsOlderThanDate from the list and click Run. All comments with a date earlier than your cutoff are resolved instantly. - Save the document (optional)
If you want to keep the macro in the document for future use, save the file as a macro-enabled document (.docm) using File > Save As and selecting Word Macro-Enabled Document.
Common Issues When Running the Macro
“The macro cannot be run because macros are disabled” error
Word blocks macros by default for security. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Select Enable all macros or Disable all macros except digitally signed macros. Restart Word and run the macro again.
Comments are still visible after running the macro
The Resolve method changes the comment status to resolved, but resolved comments remain visible in the document unless you change the review display settings. To hide resolved comments, go to the Review tab, click Show Comments, and deselect Resolved Comments.
Macro resolves comments from the wrong date range
The Date property uses the system date and time from when the comment was created. If you copied comments from another document, the date might reflect the original insertion date. Check a few comments manually by hovering over them to verify their dates. Adjust the cutoffDate value in the macro accordingly.
Manual vs Macro-Based Comment Resolution
| Item | Manual Resolution | Macro-Based Resolution |
|---|---|---|
| Time required for 50+ comments | 5–15 minutes depending on scrolling | Less than 1 second |
| Risk of missing comments | High — easy to skip comments while scrolling | None — macro checks every comment |
| Ability to filter by date | Not possible — must resolve one by one | Built-in via DateSerial parameter |
| Requires VBA knowledge | No | Minimal — only need to edit the date line |
| Document format required | Any .doc or .docx | .docm if macro is saved inside the document |
You can now resolve all comments older than a specific date in a single macro run. To refine the process, modify the macro to resolve comments within a date range by adding a second DateSerial variable for the upper boundary. For example, use If c.Date >= startDate And c.Date <= endDate Then to resolve comments from a specific month.