Word of Law No. 28 – At the Final Table

[Originally appeared 2000.]

The last column on tables promised to finish the story. This column will end the tables discussion for now, whether or not the story is “finished.”

We left off with a promise to explore what happens when columns are inserted in a table that has one or more of its cells varying in width from their column as a whole. This can happen if cells are merged horizontally, or if the width of some cells, but not the whole column, has been changed.

Perhaps the most reliable advice under these circumstances is not to attempt to insert the column with the cursor anywhere in the column that has the varying cell widths. It is likely that doing so will cause the table to have a ragged right edge, with the row or rows that have the odd width cells shorter or longer than the overall right edge of the table. For this reason, when trying to design complex tables, the advice is often given to start with several more columns than are anticipated to be necessary. It is much more reliable to remove columns than to insert them.

Still, it is instructive to review what happens, at least to help with troubleshooting.

In Word 97, inserting a column in a table that occupies the full width of the window often pushes the right edge of the table to the right of the margin, or even the page boundary. Word 97 contains only one command for inserting a column. There is no linkage of the CTRL and SHIFT keys to the column insert function similar to those described in v5 – n19 to protect movement of the right margin. Word 2000 offers more control over the table structure, as we have explored in previous issues.

The following example offers some insight on the different behavior of Word 97 and Word 2000 when inserting a column in a table. Start with a 5 row by 5 column table. Merge two cells horizontally in the middle of the table. In Word 97, if the cursor is located either in the merged cell, or in either of the columns covered by the merged cell, and a column is inserted, the table grows to the right, and the row with the merged cell grows beyond the right margin of the table.

In Word 2000, there is a choice between inserting a column to the left or the right of the column in which the cursor is located. With a table set up in the same fashion, the Insert Column to the Right preserves the aligned right margin of the table, while the Insert Column to the Left has a similar ragged right edge format as did Word 97. The overall right margin does not necessarily shift right, as did Word 97. That behavior depends on the AutoFit property of the table.

The Table AutoFit functions in Word 2000 appear to have some incomplete or confusing elements. When a table is created and “AutoFit to Window” is selected as AutoFit behavior, the table first fills the page from margin to margin. If a column is deleted, however, the table does not automatically refill the margins. That can be accomplished by applying the AutoFit to Window again. If a column is inserted, the table does not grow larger than the margin size. It would make more sense to me if this table property forced the table to fill the margins, whether columns are inserted or deleted.

If Table AutoFit is set to AutoFit to Contents in Word 2000 and no other changes are made in the table structure, then all of the cells of the table will expand or contract, based on the contents of the table. If, however, the size of a column is changed, such as by dragging the column marker in the ruler or the table borders, then the columns to either side of the affected boundary become fixed in width, even though other columns in the table still have the AutoFit to contents behavior. This sort of mixed behavior should be avoided. If the AutoFit to Contents mode is desired, and I think it has very limited usefulness, then don’t make other changes to the table structure.

Word 2000 tables have two properties that do not correspond to Word 97 table properties. Each cell in Word 2000 can have a top, bottom, left and right margin. These properties can apply to the table as a whole, and to individual cells. These settings are found in the Table Properties Dialog. On the Table Tab, the Options button opens a dialog that allows the margins to be set for the table as a whole. On the Cells Tab, the Options button opens a dialog that allows the margins for selected cells to be set differently than that of the table.

Word 97 has only a space between rows, which acts similarly to Word 2000’s left cell margin. It can only be set for the table as a whole. Do not expect tables formatted with this feature in Word 2000 to survive with the same formatting in Word 97.

Word 2000 also supports a feature called spacing between cells. It is found on the Table Properties Dialog, Table Tab, Options button. It creates empty space between cells. There is no similar function in Word 97.

These settings allow Word 2000 tables to support some formatting needs in HTML, such as boxes on forms. With that, let’s give tables a rest.

This 2000 article originally appeared in Office Watch. Subscribe to Office Watch free at http://www.office-watch.com/.