Site icon Christopher Watkin

Research Hacks # 5: Microsoft Word macros for academics

One of the sweetest time-savers I have discovered over my years as an academic is the Microsoft Word macro. Macros are ways to automate common tasks in Word. They save you time, clicks and button presses, all of which allows you to keep your mind on the content of your writing rather than on its formatting. They also allow you to accomplish with a quick key-press operations that would otherwise require multiple mouse-clicks and navigation through all manner of windows and toolbars. The result: your fingers stay poised to type and your eyes remain focused on the screen, rather than having to break your concentration and reach for the mouse.

Here are the common Word macros I use, with the keyboard shortcut on the left and the resultatnt formatting on the right (the code can be found at the end of this post). They must have saved me tens of thousands of clicks over the years.

Here are a few notes of explanation:

You can record your own macros by following the tutorial here, but in order to save you time I’ve included below the Visual Basic for the macros listed above for you to cut and paste into your version of Word. This way, you don’t have to download anything from my site and you can see exactly what you’re allowing onto your machine.

To use my VB:

 

Sub heading1()
'
' heading1 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 1")
End Sub
Sub heading2()
'
' heading2 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 2")
End Sub
Sub heading3()
'
' heading3 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 3")
End Sub
Sub heading4()
'
' heading4 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 4")
End Sub
Sub heading5()
'
' heading5 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 5")
End Sub
Sub heading6()
'
' heading6 Macro
'
'
Selection.Style = ActiveDocument.Styles("Heading 6")
End Sub
Sub heading7()
'
' heading7 Macro
'
'
Selection.Style = ActiveDocument.Styles("Emphasis")
End Sub
Sub NormalText()
'
' NormalText Macro
'
'
Selection.Style = ActiveDocument.Styles("Normal")
Selection.Style = ActiveDocument.Styles("Normal")
End Sub
Sub BlockQuotation()
'
' BlockQuotation Macro
'
'
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(1.25)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
Selection.Font.Color = -654262273
End Sub
Sub yellow()
'
' yellow Macro
'
'
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
End Sub
Sub red()
'
' red Macro
'
'
Options.DefaultHighlightColorIndex = wdRed
Selection.Range.HighlightColorIndex = wdRed
End Sub
Sub blue()
'
' blue Macro
'
'
Options.DefaultHighlightColorIndex = wdTurquoise
Selection.Range.HighlightColorIndex = wdTurquoise
End Sub
Sub purple()
'
' purple Macro
'
'
Options.DefaultHighlightColorIndex = wdPink
Selection.Range.HighlightColorIndex = wdPink
End Sub
Sub CWNote()
'
' CWNote Macro
'
'
Selection.TypeText Text:="[]"
Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="CW:"
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=" "
End Sub
Sub OrangeText()
'
' OrangeText Macro
'
'
Selection.Font.Color = -654262273
End Sub

LIKE THIS POST?
. Sign up for my blog updates and never miss a post.

* indicates required

 
CC Image courtesy of Rachel Knickmeyer on Flickr

Exit mobile version