I created this macro for converting critiques to contest format when I was judging an RWA contest. We weren’t allowed to use comments, but I like using comments when I’m reading something rather than dealing with changing the text color. This way you can edit with comments as you’re more comfortable (though you’ll still have to fix the track changes if you make any) and when you’re done, run the macro to convert it to a form they can easily see.
This can be used for critiquing and editing as well, if the recipient is unable to see your comments for some reason.
Add the Macro to Word 2010
(Directions may vary for other versions and other word processors, but I’ve used a variation of this in Word 2003 as well.)
1) Find the Macros button at the end of the View ribbon
2) Select View Macros from the dropdown menu
3) Name your macro in the text box at the top
4) Click Create
5) Copy all the below code lines
6) Paste the lines into the macro window between Sub [your macro name from step 3]() and End Sub.
Dim objComment As Comment Dim myText As String For Each objComment In ActiveDocument.Comments 'objComment.Scope.InsertBefore "||" myText = "<" & objComment.Range.Text & ">" objComment.Reference.InsertAfter myText objComment.Delete Next Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find.Replacement.Font .Bold = True .Color = wdColorBlue End With With Selection.Find .Text = "[<]*[>]" .Replacement.Text = "^&" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll
To Use Your Macro
1) Open your document with comments that need to be colored and inline
2) Use Save As to make sure you have a backup copy with the comments (undoing this process can be tricky).
3) Put your cursor at the top of the document before you begin
4) Find the Macros button at the end of the View ribbon
5) Select View Macros from the dropdown menu
6) Select the Macro you created from the list in the box
7) Either double click or select Run to activate.
Modifying the Macro Code to Your Preference (For Advanced or Adventurous Readers)
Some aspects of the above code are changeable, but be careful to keep a backup so you can undo, and always test your changes before you need them for a rush job.
1) The markers for the text:
I used < and > to mark the text, but you may prefer something else. To change the markers, though, you need to adjust not one but two lines.
myText = "<" & objComment.Range.Text & ">"
.Text = "[<]*[>]"
The markers must match in both places or the text will not be formatted properly.
2) Add a marker to the beginning of the selection text
When you make a comment, often you select a sentence or two that relate to the comment. I have it turned off, but if you remove the single quote in front of the line below, it will put || in front of the selected section.
Warning: Do not use the same marker for the comment and to mark the selected text. It will confuse the macro.
3) Change the formatting of the inline comments
The formatting of the inline comments is controlled by these two lines:
.Bold = True .Color = wdColorBlue
Here’s a listing of other colors available using the name labels: Word Colors
The Bold is obvious, but the color uses a weird number system unique to Office as far as I can tell. If you want to change it, search the Web for “MS Office macro color values” or something to get some sense of what numbers might work. Note that the number I used was actually a negative number.
4) Add your name
This is more for critiquing than for contests, but you can modify the myText line to have more than just < at the beginning. For example:
myText = "< Margaret: " & objComment.Range.Text & ">"
This will mark all my comments with Margaret: so there’s no question who made them. It also can make a crit more personal, and maybe avoid some of the questions about whether something is a personal opinion or a statement of authority (something that is responsible for more critting conflicts than I’d have thought).
5) Keep your comments as well as converting them
This is something you cannot do for the contest entries, but if you’re using the macro for people who can’t see your comments, you can leave your comments in place (allowing you to skip to them easily with next and previous comment) but also have them visible to your recipient.
This is the opposite of step two in that all you do is add a single quote before the below line. This will turn it off. To turn it back on, just remove the quote mark.
And that’s it. Enjoy.
If you have any questions, please leave them as comments and I will answer them as best I can.