Note: This article is also available as a download.

default, inserting a table into a Word document gets you a grid. Which is fine.
At least Word isn’t second-guessing you and applying its own format or foisting
some overbearing wizard on you. And if you’re after structure rather than
design, that grid is all you need. But when you want to move beyond utility and
create an attractive element on the page, you need to know a few formatting

comes well supplied with features for jazzing up tables–maybe too many, in
fact, empowering users to produce some fairly hideous results. Other users
steer clear of table formatting completely after a few failed attempts to put a
border where they want it or change a column width without disrupting the table
dimensions. Here are a few simple techniques that will enable your users to quickly
improve the appearance of their tables without going overboard or wasting time
with confusing options.

#1: Align the
table on the page

if you keep the table formatting simple, its placement can make or break the
overall page layout. The simplest positioning trick involves horizontal
alignment: left, center, or right. And the easiest way to manipulate the
alignment is to select the table (Table | Select | Table) and click the
appropriate button (Align Left, Center, Align Right) on the Formatting toolbar,
just as you would do to align regular text. Or use the keyboard shortcuts:
[Ctrl]L, [Ctrl]E, [Ctrl]R. (The Table Properties dialog box offers the same
options, but this way is quicker.) The key here is to make sure the whole table
is selected. If only certain cells are selected, these options will apply to
the text inside those cells rather than to the table.

#2: Wrap text
around the table

the old days, you had to put a table inside a frame to have text wrap around
it. The process is much easier now: Choose Print Layout from the View menu and
click on the table to display its move handle. Then, click on the handle and
drag the table wherever you want it on the page. This type of layout, like the
one shown in Figure A, can make the
page more interesting and less linear in design. It can also save on space.

Figure A

#3: Add space
around the table

you’ve dragged a table to a good spot on the page (“good” means the
table isn’t throwing things off balance by hanging awkwardly into a margin,
sitting too high or low, or creating any funky line breaks in the text), you
can polish it up by adding some space around it. A little breathing room will
enhance readability and reduce that crowded look.

within the table and go to Table | Table Properties. In the Table tab, you’ll
see that the Around option is selected under Alignment. Click Positioning to
access the options shown in Figure B.
Word is already providing a little space to the left and right of the table (0.13″),
but you can increase or decrease that amount if you want. You can also use the
Top and Bottom options to add space above and below your table.

Figure B

#4 Add space
within the table

addition to providing space around the table perimeter, it’s a good idea to add
some space within the cells. Nothing looks more slapdash than text crammed into
a table, which is what you get unless you tweak it a little bit. You have a
couple of methods to choose from here.

first approach is to manually format the text within the cell. Start by
clicking within the paragraph you want to format (or selecting multiple
paragraphs) and choosing Format | Paragraph. In the Paragraph dialog box, set
the desired right and left margins (which will add space on each side of the
text within the cell). Then, specify a Space Before and Space After setting.
Even 2 or 3 points will improve the appearance of the table text. The advantage
of adding space this way is that you can do it selectively, so you have
granular control over text positioning in the table.

second method is to build the extra internal space into the table
itself–probably quicker, but your specifications will apply to all the text in
the table. Click within the table and choose Table | Properties. In the Table
tab, click Options to open the dialog box shown in Figure C. Now, just enter the desired measurements in the Default
Cell Margins fields.

Figure C

#5: Add space
between cells

technique to explore is cell spacing. It’s certainly not an essential step for
creating an attractive table, but it creates an eye-catching effect, especially
if you combine it with shading features. To add cell spacing, click in the
table and go back to the Table Options dialog box (Table | Properties |Table
tab | Options). Click Allow Spacing Between Cells and then enter the amount of
space you want. We’re getting into trial-and-error territory now, and you’ll
need to experiment to see what works best. But here are a couple of possibilities.
Figure D has cell spacing set to 0.04″.
And Figure E has similar
specifications along with shading (blue shading applied to the entire table,
with light yellow shading applied to the table rows).

Figure D

Figure E

#6: Turn off
gridlines to see where your actual borders are

thing that’s initially confusing is the difference between the table gridlines
(which are a mere visual guide; they don’t print) and borders. Working with
gridlines turned on is helpful as you build and format a table, but to see what
you’ve produced, choose Hide Gridlines from the Table menu. (You can turn
gridlines back on via the Show Gridlines command.) For instance, in Figure F, we removed all the borders
from a table and then selectively applied a border to the bottom of the two
cells representing signature lines. Turning off gridlines (Figure G) shows whether those borders are formatted properly for
the job they’re supposed to do.

Figure F

Figure G

#7: Turn text

far, we haven’t used the Tables And Borders toolbar, but it offers quick access
to some useful options, and we’re going to use it now. To display it, just
right-click on any visible toolbar and select Tables And Borders from the list
of toolbar choices.

sideways text technique isn’t appropriate for all situations, but it’s handy to
know about it. Sometimes, you might just want to produce an effect like the one
in Figure H–a slightly
unconventional way to incorporate labels into a table. Other times, you might
have column headings that are a little too unwieldy to run horizontally, so a
good solution is to turn them sideways, as in Figure I.

Figure H

Figure I

rotate your text, select the cell(s) that contain it and click the Change Text
Direction button on the Tables And Borders toolbar twice. The first click will
rotate the text to the right, which isn’t so great for readability. The second
click will rotate it so that it runs from bottom to top, like in the figures.

#8: Manually apply
shading and borders

you want to add a little color or definition to a table, shading and borders
are the way to go. The trick is to make sure you’re applying them to the right
table components. Although the Tables And Borders toolbar offers a palette of
border placement options and lets you “draw” borders of various
formats, the Borders And Shading dialog box is probably a little less confusing
to use. For applying shading, the Tables And Borders toolbar works okay, but
the Borders And Shading dialog box offers more options, so that’s what we’ll
use here.

demonstrate the process, let’s say you want to add a border to the top and bottom
of a row and apply a light yellow fill color. Start by selecting the row and
going to Format | Borders And Shading. In the Borders tab, you’ll see a little image
of a table cell with a border on all sides. (This is assuming you haven’t
changed any border settings; by default, Word tables are formatted with a grid
border.) Since you selected a group of cells (a row, actually), Word will set
the Apply To dropdown list to Cell (meaning all the cells in the selection).
This is what we want, but bear in mind that you can change this to apply to
text or to the entire table.

create the border, click on the left, middle, and right sides of the image to remove those segments, leaving just the
top and bottom borders in place. Figure J
shows how this will look. You can make selections from the Style, Color,
and Width list boxes if you want. If you do, you’ll need to click on the table
cell image to apply those selections to the desired sides. To add color, click
the Shading tab and click in the light yellow square in the palette of options
under Fill.

Figure J

#9: Find your
favorite Table AutoFormat styles (and tweak them, if necessary)

offers 45 AutoFormat styles–prefab sets of formatting that automatically apply
various text and table effects. To see what’s available, click in your table
and choose Table | AutoFormat (or click the corresponding button on the Tables
And Borders toolbar, since we have it displayed now). Word will open the dialog
box shown in Figure K. You can spin
through the selections and try them out, see what you like. One of the options
is Table Normal, which is handy for those occasions when you want to strip all
the formatting from a table (like if you get a little carried away with various
embellishments and you’re embarrassed to even look at them).

Figure K

important to note that when you apply an AutoFormat style to a table, its specifications
will override any formatting you applied to the table yourself. For example, if
you set cell margins to add space around the text in the table, you’ll lose
that if you apply Table AutoFormat because that formatting isn’t part of those
prefab styles. So apply the AutoFormat style first and then set your cell margins.

AutoFormat choices are handy, and you may just want to use them as is. But you
also have a great deal of control over modifying them. For one thing, you’ll
notice the Apply Special Formats To options at the bottom of the dialog box. If
you like everything about a particular style but you want to leave the top row
alone, deselect Heading Rows. You may also want to use a style as a starting
point and then click Modify. You can do just about anything you want here–it’s
like modifying a character or paragraph style, only the choices are table-specific.

final note about Table AutoFormat: If there’s a style you want to use all the
time, you can select it and click Default. Word will let you set it as the
default style for the current document or for the current template.

# 10: Create a
custom table style for instant formatting

can use Table AutoFormat to create your own set of attributes and save them as
a user-defined style. You can then apply the style whenever you want to create
that particular effect. To build a style, open the Table AutoFormat dialog box
and click New. Enter a name for the style and choose the existing style that
you want to base your new style on. (Word defaults to Table Normal, which is
unformatted, in case you want to start with a blank slate.) Make the formatting
selections you want for the style. If you want the style to be available to
other documents based on the current template, click Add To Template.
Otherwise, the style will belong to the current document only. Click OK and
then click Close.

apply the style, click in a table and open the Table AutoFormat dialog box. Choose
User-Defined Table Styles from the Category dropdown list box to display your
custom style(s) as shown in Figure L.
Select the style and click Apply.

Figure L

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays