Why I don’t use Custom Table Styles in Microsoft Word 2002 and 2003
Quick Reference: Why I don't use Table Styles in Word 2002 or 2003
I've given up trying to use Table Styles for professional documentation. This page explains why.
In Word 2002, Microsoft introduced Table Styles. "Wow!", I thought. Table Styles promised a quick way to format tables consistently and easily.
And on the face of it, they do.
Create a table. Choose Format > Styles and Formatting. Find the long (very long) list of built-in table styles. Click once and your table is "formatted". If that fits your needs, you may go home happy.
In my work, I create templates for professional use. I need to define custom ways to control table formatting in several subtle ways. Using custom Table Styles should be the answer to my needs. But I don't find them useful.
Microsoft has never documented how they work. I've only been able to discover how they work through trial and error, and from reading about other users' frustrations on Microsoft's newsgroups.
Every few months since Word 2002 was introduced, I've experimented with Table Styles. Every few months I've been disappointed, because they never give me quite what I need.
This is why I've finally given up on them.
Table Styles aren't a grouping of paragraph styles
Paragraph styles are the basic mechanism for formatting text in Word. You can't do serious work without coming to grips with them.
In my view, Table Styles should be a mechanism for identifying which paragraph styles I want used in my text + the overall settings the table itself needs.
But that's not how Table Styles work. They apply direct formatting to my text, and they don't play nicely with paragraph styles.
Table Styles don't play nicely with Paragraph Styles
If text in the paragraph is in any paragraph style other than Normal, then sometimes the formatting of the Table Style over‑rides the paragraph style, and sometimes vice
versa. For example:
- if the Table Style is formatted so that the text is right‑aligned, and I apply a paragraph style that is left‑aligned, then the text will be right‑aligned. The Table Style "wins" the alignment debate.
- if the Table Style is formatted with 9pt font, and I apply a paragraph style that has 10pt font, then the text will be 10pt. The paragraph style "wins" the font size debate.
This leaves me frustrated and confused. I apply a paragraph style to text in my table, and Word applies only some of the paragraph style's settings. Only by trial and error can I can work out which settings of a paragraph style will be applied to the text in a table.
As a user, this single reason is sufficient for me to avoid Table Styles.
Table Styles apply fonts inconsistently
The font identified for the Table Style appears to be applied inconsistently. From testing with trial and error, the rules appear to be the following.
- If I apply a Table Style to a table, and if the Table Style uses the same font as the document's Normal style, then the font in the Table Style is applied to text in the table.
- If I apply a Table Style to a table, and if the Table Style uses a font that is different from the document's Normal style, then:
- if the text in the table is in style Normal, the font specified in the Table Style is ignored.
- if the style of the text in the table is in some other paragraph style, then the other style's font is respected and the other paragraph style's font is applied to the text.
Table Styles apply font sizes inconsistently
The font size defined in a Table Style will only be applied to my table if the document's Normal style happens to be either 10pt or 12pt.
If the document's Normal style uses, say, Times New Roman
11pt, then any font size I define in the Table Style is ignored.
Furthermore, I can only use 10pt fonts in a Table Style if the document's Normal style is in 10pt. If style Normal is in some other size, I can have 9pt, or 11pt in my Table Style,
but not 10pt.
Table Styles expect that all text in my table is in style Normal
When I go to insert a table, my cursor is obviously within a paragraph of text. When I insert a table, the text in the table is automatically formatted in the style of that paragraph.
So, let's say I have clicked in a paragraph in style Body Text, and I wish to insert a
table and use a particular Table Style. I insert the table, and I apply the Table Style.
But the text in the table will now be in paragraph style Body Text. And, as we've seen, Table Styles don't play nicely with paragraph styles.
The only way I can get the Table Style settings to work is to select the whole table, and apply style Normal.
Table Styles are difficult for developers to use
I create lots of Word templates for clients. I've long since automated a lot of that work, partly because it speeds up the process, and partly because I can replicate a template with accuracy that I can't achieve if I do it by hand.
However, a Table Style cannot be entirely constructed in code. That is because some parts of a Table Style are not exposed in Word's object model. For example, in the user interface, I can specify that the heading row in a Table Style is to repeat at the top of each page. I cannot do that when defining a Table Style in code.
Therefore, tools to create a Table Style or to "fix up" messy tables will not work completely.
What would I have to do to use a Table Style successfully?
So, to use a Table Style successfully I would have to:
- modify the Table Style to use the same font as my document's Normal style
- if I need the Table Style to use 10pt text, I must ensure that the document's Normal style is in 10pt text
- each time I insert a table, I must apply the Table Style, then select the whole table and apply style Normal (or, I must apply style Normal, then insert the table and apply the Table Style)
- if I want to stay sane, I must avoid applying a paragraph style to text in a table
- I have to give up on the idea of creating Table Styles in code.
Since I've never had a document for which these rules are appropriate, I have given up on trying to use Table Styles to format my tables.
Is Word 2007 going to solve these problems?
I don't know yet. Certainly there have been some changes. But as far as I know, Microsoft has not yet documented how Table Styles work. So the only way to find out is trial and error.
Resources
If you're looking for more information about Table Styles, try the following:
- Articles for developers at Microsoft.com
- Automating Word Tables for Data Insertion and Extraction
(by Cindy Meister, at MSDN)
- Automating Word Tables for Data Insertion and Extraction
- User's posts to Microsoft's newsgroups