Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

In a sample document, there are a bunch of styles (in Garamond) based on Plain Text (Courier). I would like to change those styles to another font (Georgia, for example).

Since the styles in question are in Garamond but all based on Courier (from Plain Text) i would guess that each of the styles has had their fonts changed individually. Which makes me think i have to change each to the new font individually.

But... that can't be the only way to do this, right? There must be a way to make a wholesale font change to a group of styles like this. Or is there maybe something missing from my picture of how styles work.

If it matters, i'm using Word 2007.

Edit: I am not asking about replacing fonts with Control-H, unless you have a way to subsequently apply those changes to the affected styles.

Preferably the solution would be one that i could later explain to less-technical users how to do the same. So while the VBA solution might solve the problem for me this time, it is limited to script-savvy users.

share|improve this question
up vote 1 down vote accepted

I think the only way of redefining propeties of a large set of styles in one go would be to automate using VBA.

What I would do here instead is redefine an underlying style (probably Normal rather than Plain Text, as Normal is the default for new text in a blank document) with the base properties of your document's text (language, Garamond font, size, line spacing and perhaps paragraph spacing) and change the other styles to be based on that.

This will give you more maintainable set of styles in the longer run.

If all your headings are going to be a different font, say Helvetica, you might want to set say Heading 6 as that font and base all other headings on that, but I don't think there's much need to use a much more complex model of 'inheritance'.

share|improve this answer
Redefining underlying styles won't work, because only one or two are based on Normal. The rest are based on Plain Text with a font applied on top of it. VBA sounds plausible, though it isn't my preferred approach; if it comes up again, i'd like to be able to describe the "how-to" to less technical users. – bill weaver Nov 23 '09 at 11:10
Sure - this was a longer term solution. – e100 Nov 23 '09 at 15:22
Accepting for VBA automation solution. Looks like the only way. – bill weaver Feb 3 '10 at 17:52

To wholesale replace fonts in Word :

  • Open the Replace dialog
  • Click inside the "Find what" field (but don't type any search string)
  • Click on the More button
  • Click on the Format button and choose Font
  • Choose your font name (you may also set style and size for finer control)
  • Click OK
  • Click inside Replace with (but don't type any search string)
  • Repeat the process for choosing the replacement font
  • Click Find Next plus Replace or click Replace All, to execute the replacement.
share|improve this answer
That doesn't work for me: "0 replacements." Besides, it doesn't address swapping fonts in styles, which is what i want to do. I want the fonts in the styles to be changed. – bill weaver Nov 23 '09 at 10:56
"0 replacements" is because you're using the fonts implicitly thru styles, so the above technique doesn't apply to your problem. – harrymc Nov 23 '09 at 11:04
Right. The original question was about changing fonts in styles. – bill weaver Nov 23 '09 at 11:26

If the inheritance from one style to another has been overridden explicitly with a different font in each one, you are stuck with changing it back in each one. However, if this is a .dotx template, you could do this with some find-and-replace in the xml of the file which will probably be quicker than figuring out a way to do this with VBA.

Best book for any of this kind of work when busting open the 2007 file formats is Advanced Office Documents 2007 edition by Stephanie Krieger

Aside: while it won't help reduce the effort this time round, the 'right' way to change these will be to choose or create a theme font set, with your chosen font for headings and for body text. Then in your styles choose 'Georgia (Headings)" or "Comic Sans (Body)" rather than the font face by itself. For lower-level styles base them on a previous one ideally (eg Heading 2 from Heading 1). Selecting the 'theme' fonts rather than explicit choices means that future changes are made far simpler by just changing the font set.

PS: please please please don't use Comic Sans for your body text.

share|improve this answer
How would i edit the dotx file to get at the XML? I've opened in VS2008, Ultraedit, and Notepad++ but it's not straight XML or it's encoded weird. Suggestions? I'll look into the theme font sets. – bill weaver Nov 23 '09 at 11:22
It's a zip file, so the first step is to rename it to add ".zip" so Windows will recognise it. Don't unzip / extract files as this won't work. Simply browse inside, take out the files you need (copy them out and paste elsewhere). Edit them, then copy and paste them back in, say yes to the prompt to overwrite. Rename to drop the .zip, job done. – AdamV Nov 24 '09 at 21:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .