Word 2004: Automatically updated styles only work with built-in commands

Posted by Pierre Igot in: Microsoft
June 8th, 2005 • 1:44 am

I don’t normally use automatically updated styles in Word, but sometimes I have to deal with them. And, of course, like any other feature in Microsoft’s products, the implementation of this particular feature is buggy.

Say for example that you have a heading style called “Heading 1” that is set to automatically update itself whenever you modify the formatting of a paragraph formatted in “Heading 1“.

So you select a paragraph in “Heading 1” or put your insertion point somewhere inside the paragraph, and then go to “Format > Paragraph > Indents and Spacing” and you change the spacing after setting to 12 points.

When you exit the formatting dialog box, Word changes the spacing after for the currently selected paragraph and, because “Heading 1” is an automatically updating style, it also changes the spacing after for all other paragraphs in “Heading 1” in your document.

If you want to use spacing after regularly and properly in Word, however, using the default interface is extremely painful. Fortunately, you can customize Word by adding macro commands and shortcuts for your most often used commands. For example, I have a macro command that automatically changes the spacing after setting for the current selection to 12 points:

Sub setSpaceAfterTo12()
    setSpaceAfterTo (12)
End Sub

Sub setSpaceAfterTo(mySpace)
    With Selection.ParagraphFormat
        .SpaceAfter = mySpace
    End With
    StatusBar = "Space After: " & mySpace & " pt."
End Sub

And I have a toolbar button that triggers this particular macro. So now whenever I want to set the spacing after of a paragraph to 12, I just have to click on that button.

But guess what? When I do that, and the current selection is a paragraph formatted with the automatically updating “Heading 1” style, Word does change the spacing after setting for the current paragraph to 12 points, but… it doesn’t automatically update the style!

Why does it update the style properly when I change the spacing after setting using Word’s default interface, and not when I use my macro command and toolbar button as a shortcut?

Because it’s Microsoft, and when Microsoft adds a new feature to one of their products, they simply do not bother to test it to make sure that it works properly in conjunction with existing features.

My macro command and toolbar buttons are nothing extraordinary. They are regular toolbar buttons created using Word’s built-in customization features — which are pretty much a requirement if you want to use Word as properly as possible and still retain your sanity. But if you customize Word, even though the interface specifically encourages you to do so, Microsoft punishes you for it by making sure that your customizations will not work properly with other built-in features.

Grrr.


Comments are closed.

Leave a Reply

Comments are closed.