Editor’s note
This article is a spiritual successor to my previous article about Microsoft Word macros. If you are completely unfamiliar with macros and what they can do, I suggest you start there.
This article is a spiritual successor to my previous article about Microsoft Word macros. If you are completely unfamiliar with macros and what they can do, I suggest you start there.
For my 103 class, one of the main aspects that I evaluate is the student’s ability to use academic English. Therefore, a large portion of my marking time is spent identifying register issues, which mainly manifest as uses of casual or imprecise language and personal pronouns.
Looking at the time I spent highlighting the same words and expressions again and again, I felt like one of the people in black-and-white segments of infomercials: there has to be a better way.
I thought about Word’s “Search” function but the idea of looking up more than 50 different expressions one at a time seemed like more work than simply highlighting as I read.
After some research, I found out that it was possible to program a macro in Word that would search and highlight a list of words or expressions from a reference file. Then, all that would be left for me to do is to come up with a list (or lists) of terms or expressions considered too casual for an academic essay and I could have a Word macro highlight them all for me!
Video tutorial explaining how to program and run the macro. (Music in the video: Overblow, Ketsa)
First, you will need to go into Microsoft Word’s macro menu. To access it, either go through the “View” tab in Word’s top menu or use the search bar and select “View Macros”.
In the Macros menu, enter the title of your macro in the bar at the top and then click on “Create”.
This will open Visual Basic and display your new, blank, macro. At this point, the macro only includes the title you have entered, and the start and end functions.
At this point, you need to copy/paste the code below into Visual Basic. Double-check that you only have one instance of “Sub” and “End Sub” in your code or you will receive an error message if you try to run it. If “Sub” and “End Sub” appear in double after the copy/pasting, delete 1 of each.
Sub FindMultiItemsInDoc()
Dim objListDoc As Document
Dim objTargetDoc As Document
Dim objParaRange As Range, objFoundRange As Range
Dim objParagraph As Paragraph
Dim strFileName As String
strFileName = InputBox("Enter the full name of the list document here:")
Set objTargetDoc = ActiveDocument
Set objListDoc = Documents.Open(strFileName)
objTargetDoc.Activate
For Each objParagraph In objListDoc.Paragraphs
Set objParaRange = objParagraph.Range
objParaRange.End = objParaRange.End - 1
With Selection
.HomeKey Unit:=wdStory
' Find target items.
With Selection.Find
.ClearFormatting
.Text = objParaRange
.MatchWholeWord = True
.MatchCase = False
.Execute
End With
' Highlight the found items.
Do While .Find.Found
Set objFoundRange = Selection.Range
objFoundRange.HighlightColorIndex = wdBrightGreen
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Next objParagraph
End Sub
Now, according to my correction code, register issues are always highlighted in turquoise. To change the colour used to highlight the text, we are going to go to the last block of the code and find the line: “objFoundRange.HighlightColorInder = wd”. The word or words after “wd” dictate the colour of the highlighting. Therefore, for my example, I would need to change the line of code to: “objFoundRange.HighlightColorInder = wdTurquoise”.
There are ways to customize the colours available for highlighting but I have always found the basic colours to be more than sufficient. Some simple basic colours you can input after “wd” are:
Now, if you have done everything properly, when you run the macro – either through the Macros menu or an assigned shortcut key – a window will pop up to prompt you to enter the full name of the list document.
If the reference lists you are using are in your “Documents” folder, you only need to type in the full name of the file, i.e. “Register.docx”.
If you download reference lists provided below, they should appear in your “Downloads” folder. You will need to move them to “Documents” for Word to detect them properly using the file name only.
Here are 3 basic reference lists available for download:
If that does not work, you will have to find the full address of the file on your computer. The simplest way to do this is to find your file in Windows Explorer, hold Shift and right click on it. On the menu that appears, select “Copy as path”. Now, all you need to do is go back to your Word prompt and paste the content that is in your clipboard (CTRL+V).
After you click on “OK”, the macro should run and highlight all the words and expressions included in your reference document.
To create a new reference list, simply create a new Word document and write down every word or expression you want the macro to look for as its own paragraph. For the reference list to work properly, you must press Enter after each entry.
When you have listed all the terms you want your macro to look for, save the file in your “Documents” folder under a simple name. Then, all you need to do is enter the name of your file when prompted by your macro. Simple as that!
Personally, I will be sending this tutorial to my students. Over time, I have found out that most register issues are inattention mistakes, which can be caused by a lack of effort as much as stress, anxiety, or cognitive fatigue. As the macro only highlights the mistakes, my students still need demonstrate that they know how to fix them on their own. I do not believe that truly lazy students, for whom the squiggly red lines under their words are but pretty decoration will put in the additional effort required to run this macro.
This macro truly shines when you have a list of words or expressions that you have told your students to use or to avoid. In the files attached to this article, I have included 2 other reference documents that I thought might be useful in evaluating academic English: personal pronouns (as well as some major thesis statements no-nos) and transition words/expressions.
If you are working with a textbook that includes new vocabulary and expressions, you could create a reference list for those words and expression to track your students’ integration of that material. Similarly, if you ask your students to write a resumé or a cover letter, you could have a list of power words they should use.
Do you know of any other contexts where this macro could help you with your correction or help your students improve their writing? Can you think of any other important reference lists? Let us know in the comments section below.
I would like to thank Penny Lee Biggin, Monica Madden and A. Ready whose document I have adapted to create my register issues reference list. The transition words reference list was adapted from a PDF published on the Miami Dade College website.