Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Setting a Default Table Border Width.

Setting a Default Table Border Width

Written by Allen Wyatt (last updated June 17, 2023)
This tip applies to Word 97, 2000, 2002, and 2003


When you insert a table in Word, a border is automatically created for each cell in the table. This border is a single line, one-half point in weight. Unfortunately, Word provides no way for you to change the default line width you use when creating the table. While it is true you can pick a line width in the Borders and Shading dialog box, this weight is reset to one-half point when you insert a new table.

If you want some other line width, such as three-quarters of a point, you have a problem. You must manually select any new table and format the borders so they are the desired width. If you work with lots of tables, this can quickly become a hassle. You could, of course, create a table style, but applying a table style can give uneven results if all you want to do is change the line width or if you are working with a document where there has been a lot of explicit formatting applied to the tables.

Perhaps the best way around this problem is to write a macro. Even though this may not be the most ideal solution, it certainly is easier than manually changing every table in the document.

The following macro, FixCellBorders, steps through every cell in every table in your document and makes sure the minimum line weight is three-quarters of a point. It does this by checking out the current line settings, and then making the adjustment only if necessary.

Sub FixCellBorders()
    ' Work through all tables in document
    For Each objTable In ActiveDocument.Tables
        ' Work through all cells in each table
        For Each objCell In objTable.Range.Cells
            ' Work through all borders in each cell
            For Each objBorder In objCell.Borders
                ' Check if line weight is less than 0.75 pt
                If objBorder.LineWidth = wdLineWidth025pt _
                  Or objBorder.LineWidth = wdLineWidth050pt Then
                    ' too thin, change it
                    objBorder.LineWidth = wdLineWidth075pt
                End If
            Next objBorder
        Next objCell
    Next objTable
End Sub

As you can imagine, the macro is not terribly fast since it looks at all four borders for every cell in every table of your document. The advantage, however, is that the macro will only modify the weight of any cell border that is at one-quarter or one-half point. This means that any manual formatting you have done for different line widths will not change.

If you are looking for a bit faster macro, the following (FixTableBorders) will do the trick. Instead of looking at individual cells, it works on entire tables. The difference, however, is that it resets every border of every table to three-quarters of a point, using a single line. If this fits your needs, however, it is definitely the easier (faster) way to go.

Sub FixTableBorders()
    For Each objTable In ActiveDocument.Tables
        With objTable
            With .Borders(wdBorderLeft)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
            With .Borders(wdBorderRight)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
            With .Borders(wdBorderTop)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
            With .Borders(wdBorderBottom)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
            With .Borders(wdBorderHorizontal)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
            With .Borders(wdBorderVertical)
                .LineStyle = wdLineStyleSingle
                .LineWidth = wdLineWidth075pt
            End With
        End With
    Next objTable
End Sub

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (880) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Setting a Default Table Border Width.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Special Differences when Searching

Word includes two different search engines. Which search engine you choose to use will dictate what Word shows as ...

Discover More

Workbook Events

You can create macros that run whenever Excel detects a certain event happening within an entire workbook. This tip ...

Discover More

Storing Building Block Entries with a Document

Building Blocks can provide quite a bit of flexibility and power in a document. If you want to share Building Blocks with ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Shading Table Rows

Need to format the rows of a table so that your data is showcased better? Here are a few ways you can get the shading you ...

Discover More

Changing Spacing Between Table Cells

Need to adjust the space between individual cells in a table? Word gives you a good deal of control over this spacing, as ...

Discover More

Quickly Removing Table Borders

Insert a table in your document and Word assumes that you want borders around the table and its cells. Here's a shortcut ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.