Written by Allen Wyatt (last updated January 24, 2026)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
Moshe has a Word document that was edited by a copy editor. Anywhere that the editor inserted a comment, it starts with a left parenthesis, followed by "ed note:", then the note, and finally a right parenthesis. For Moshe's in-house processes, it is more advantageous to have these notes as actual Word comments. He wonders if there is a way to automate the finding of these in-text notes and covert them to Word comments.
The way to automate this process is through the use of a macro. The macro can rely on the Find and Replace capabilities of Word, but add some processing whenever a matching comment is located.
Sub NoteToComment()
Dim sTemp As String
Selection.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Text = "\(ed note:*\)"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
End With
Do While Selection.Find.Execute
sTemp = Selection.Text
sTemp = Mid(sTemp, 10, Len(sTemp) - 10)
sTemp = Trim(sTemp)
Selection.Text = ""
Selection.MoveEnd unit:=wdCharacter
Selection.MoveStart unit:=wdCharacter, Count:=-1
If Selection.Text = " " Then Selection.Text = " "
Selection.Collapse
ActiveDocument.Comments.Add Range:=Selection.Range, Text:=sTemp
Loop
End Sub
The macro first moves to the beginning of the document, then it sets up the conditions for searching. What is looked for is the pattern that Moshe noted—a left parenthesis, followed by "ed note:", then the note, and finally a right parenthesis—this sequence is assigned to the .Text property of the Find object. Note that each parenthesis has a backslash in front of it. If these backslashes weren't included, Word would consider the parentheses as control characters in the search pattern. In addition, the .MatchWildcards property is set to True so that the .Text property is treated as a search pattern.
In the Do While loop, which is entered each time a matching comment is found, the sTemp variable is set to the text of the comment. The first 9 characters are stripped off (these are "(ed note:") along with the final right parenthesis. The comment is removed from the document and if there are multiple spaces left after the removal, those are deleted as well. Finally, an actual comment is added that contains the text in the sTemp variable.
There is one thing to remember when using this macro: It is dependent on matching the comment pattern correctly. This means that if there are some comments that don't follow the pattern exactly, those may not be found and converted. (For instance, if there is a space after the opening left parenthesis.) Further, if the comments in the document contain parenthetical remarks within the comment (in other words, there are nested parentheses in the comment), that will mess up what is found by the wildcard search and what subsequently ends up in the comment.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1797) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2019. Spend more time working and less time trying to figure it all out! Check out Word 2019 For Dummies today!
Adding comments to a document is a normal activity when writing and editing. Once comments have been added, you may ...
Discover MoreWhen developing a document, a common practice is to use comments to discuss changes with other people or to make notes ...
Discover MoreIf you would like to add non-printing notes to your document, the Comments feature is one way of doing that. Here's how ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2026 Sharon Parq Associates, Inc.
Comments