Research Hacks #23: Three Microsoft Word macros for quick mark-up of articles, essays and thesis chapters

I have the pleasure of reading a lot of student essays and supervising a number of research students, and over the years I have found that marking up an essay or thesis chapter before I read it helps me to focus and read effectively. The technique also speeds up the reading of articles in Microsoft Word format (I’ll deal with PDF in a future post). Below are three Microsoft Word macros I have written or adapted, and that I regularly use all three for performing a quick mark-up of student essays before I read them.

To use the macros below in your own version of Microsoft Word:

  • Within Microsoft Word press ALT + F8 to get a list of the current macros in your normal.dotm template.
  • Click “edit” for any of the macros you see (it doesn’t matter which one). This will bring up the MSWord Visual Basic editor.
  • Scroll down to the bottom of the window and paste in the code I provide below.
  • Close the Visual Basic window. Simple! You might need to restart Word for the macros to take effect.
  • You will then need to go through the macros and assign their keyboard shortcuts manually, as I can’t find a way to incorporate keyboard shortcuts into the macros themselves. Here’s how to assign the shortcuts, courtesy of Lorien on this page:
    • Click the Microsoft Office Button , and then click Word Options.
    • Click Customize.
    • Next to Keyboard shortcuts, click Customize.
    • In the Categories list, click Macros.
    • In the Macros list, click the macro that you want to change.
    • In the Press new shortcut key box, type the key combination that you want to choose.
    • Check the Current keys box to make sure that you aren’t assigning a key combination that you already use to perform a different task.
    • In the Save changes in list, click the option that matches where you want to run your macro. Important   To make your macro available in all documents, be sure to click Normal.dotm.
    • Click Close.
  • When you next quit Word you will see a prompt saying something like “Changes have been made that affect the global template, Normal.dot. Do you want to save those changes?”. Click “yes” if you want your new macros to be available next time you open Word.

To read all the research hacks posted to date, please click here.

1. Change the text colour of all quotations to orange:

I like using this because it shows me at a glance not only how many direct in-line quotations are being used, but how they are bunched or distributed throughout the document.

NB: this also converts all straight single and double quotation marks to curly quotation marks.

Sub AllQuotationsOrange()

‘ AllQuotationsOrange Macro

‘First do a replace to make sure quotes are all smartquotes
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = “‘”
.Replacement.Text = “‘”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.HanjaPhoneticHangul = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = “”””
.Replacement.Text = “”””
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.HanjaPhoneticHangul = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = -654245889
With Selection.Find
.Text = ChrW(8220) & “*” & ChrW(8221)
.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

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = -654245889
With Selection.Find
.Text = “‘*’”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = -654245889
With Selection.Find
.Text = “«*»”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

End Sub

[/sourcecode]

2. Highlight all punctuation (full stops highlighted in yellow; text colour of other punctuation changed to light purple):

This is useful for checking signposting as well as monitoring sentence length and following arguments across paragraphs.

Read more>>