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:
- These shortcuts make it easier for you to find what you want in a marked-up document by using a consistent highlighting scheme. You can call up any previously marked-up document and know immediately what all your highlights meant without having to consult any custom key. The scheme I use is:
- Green highlight for people
- Blue highlight for names of books, articles and places
- Orange text for quotations (in-line quotations: ALT + O; block quotations ATL + Q)
- Yellow highlight for general highlighting of sentences or phrases that I want to be able to find again quickly
- Red highlight for the most important words/sentences
- Purple highlight as a catch-all or document-specific category not covered by the other colours
- If you want to use the ALT + N macro, be sure to replace my initials (CW) in the code below with your own.
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:
- 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.
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
CC Image courtesy of Rachel Knickmeyer on Flickr