Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm making my own study guide for the SCJA (Sun Certified Java Associate) exam. Basically what I am doing is

  1. Reviewing the stuff on the McGraw Hill study guide, and then
  2. Typing up notes about the stuff I need to review or new things.

It's going pretty well, but there's on problem: It's really annoying to have to change the font to Consolas every time I want to have some code or a keyword stand out. The code I guess I have to change myself, but is there any way of letting Word know that I want a certain word's font changed?

NB: I am not asking for syntax highlighting.

share|improve this question
up vote 0 down vote accepted

You would want to create yourself a SmartTag which will detect your keyword as it's typed and perform the appropraite action.

You can learn about SmartTags from the following sites

This is most likely the only way to do this however creating smart tags is no five minute job so I think you may want to do this one manually still.

share|improve this answer

You can write a VBA macro to change the font at the insertion point (the current location you're at in the file) with the press of a hotkey. That might be slightly easier than clicking through the font list dropdown.

You can start with this KB article, but you'll need to adapt the code a bit:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.