(Warning: this one may be a bit on the geeky side…)

Following on from the post earlier today about inserting comments in Microsoft Word, someone asked whether it’s possible to create a comment bank in Word. When marking lots of papers in digital format - which is good because it’s quick and saves lots of paper - this would save you from having to retype frequently used comments umpteen times.

The answer is “Yes, you can - using macros“. I’ll explain how here…

First, what is a ‘macro’?

At the risk of oversimplifying, a macro is a piece of code stored in a Word document (or one of many, many other file formats that support macros). Macros can save you time, as they can contain instructions for quickly performing a series of complex and/or time-consuming repetitive tasks. Rather than repeatedly performing such tasks manually - e.g. typing in a limited number of long comments again and again - you can call on a set of macros to do this for you much more quickly.

If the word “code” makes you feel queasy, don’t worry - you won’t have to write any code. In fact, you won’t even need to see any code. All you need to do is “tell” Word: “Watch me now”, and it’ll note carefully what you do until you say you’re done demonstrating. Word will then “remember” what you just did, and can repeat those exact same steps when you tell it to.

In this case, we’ll tell Word to record the steps for inserting a comment for some highlighted text. It will then be able to insert the same comment for any highlighted text when you tell it to.

(NOTE: These macros will be available to you only on the computer you record the macros on. They do not follow the document, but are stored on the computer itself.)

BEFORE WE PROCEED: Click Tools >> Options >> Security tab >> Macro Security >> Medium >> OK >> OK. Then close Word and open it again.

(You’ve just made sure Word will allow you to run your macros, and next time you try to open a Word document containing macros, it’ll ask you whether you want to enable the macros. If you’ve made them yourself, or if you got the document from someone you trust, click “Yes”. If you got it off Limewire, for example, it may be wiser to click “No”, as someone who knows what they’re doing can write a virus using Macro code!)

Recording a macro:

  1. In Microsoft Word, type “Aardvark” (or some other word or paragraph that comes to mind) and highlight it.
  2. Click Tools >> Macro >> Record New Macro >> OK. Word is now recording your actions. You will see a little box hovering over the page with two buttons: one red, round Pause recording button and one blue, square Stop recording button.
  3. Keeping the text highlighted, click Insert >> Comment. A pink ‘bubble’ will appear on the right-hand side of the document.
  4. Type a comment you know you will be repeating many times for different students (e.g. “Good job!” or something like that).
  5. Click the Stop button. You have now recorded a macro that inserts a comment for whatever text happens to be highlighted.

You can then repeat these same steps with a different comment text (e.g. “You forgot to show the steps!”), and Word will keep track of all the macros.

Playing a recorded macro:

Now that you have recorded one or a few macros, it’s time to take them for a test drive. We’ll do it the tedious way first.

  1. Highlight a word/paragraph, and click Tools >> Macro >> Macros. You will see a list of all the macros you have recorded so far. If you’ve followed my steps exactly, they will be called Macro 1, Macro 2, etc. Next time you may want to give them more descriptive names… (NOTE: Macro names cannot have spaces in. Use an underscore for spacing, e.g. “Missing_citation”.)
  2. Select the macro you want to run, and click Run. It will then perform the steps you recorded before, i.e. insert the same comment text you wrote before and apply it to the highlighted text.

While this is kind of cool, the four or five clicks required just to run one macro can get a bit tedious. There are several ways you can deal with this, of which I will recommend solution 2:

Solution 1: Make a keyboard shortcut:

Under step 2 of “Recording a macro” above, you could assign a keyboard combination to the macro (just before you you click OK to start recording), but these can be hard to remember and you might also accidentally create one that conflicts with existing Windows keyboard shortcuts (e.g. <Ctrl> + C or <Ctrl> + V).

Solution 2: Make a new toolbar and put buttons for each canned comment on it:

  • Click View >> Toolbars >> Customize >> Toolbars tab >> New.
  • Type in the name “Comment Bank” and click OK. This toolbar - empty so far - is now hovering over the page. You can drag it up to the toolbars above and “dock” it (which means placing it so it sort of clicks into place next to, between or below the other toolbars).
  • (NOTE: If you accidentally closed the Customize dialog box, click View >> Toolbars >> Customize to display it again before proceeding to the next step).
  • On the Commands tab, in the Categories list on the left, scroll down to Macros and select this category. You will see a list on the right of all the macros you’ve recorded. Click on one of the macros and, holding the left mouse button down, drag the macro up to your new toolbar and drop it on there. Repeat with all the other macros. (In the image below, I’ve made two macros called “Citations” and “Good_job”, and I’ve dragged “Citations” up onto the toolbar, where it has been associated with a button.)

Macros

  • Keeping the Customize dialog box open, right-click the button up on the toolbar. You will see a menu where you can change the name. Remove the text “Normal.NewMacros” and keep just the macro name you gave it. (You can also separate each of the buttons more clearly by applying the “Begin Group” option to each of the buttons except the one on the very left.)

Okay, now it’s time to test your new toolbar. Highlight a word, and click on one of the buttons on your new toolbar. The comment you wrote for that macro should be inserted immediately. Voilà!

1 Comment so far »

  1.  

    Tony Potts said

    August 13 2008 @ 9:03 pm

    Hi Stale!
    Just wondering whether there have been any more postings - or do I not receive any more cos I’m ex-ISM….?!
    Would love to still receive these trhough google reader….!
    Hope all is well :)

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: