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: Fitting Text Into Cells.

Fitting Text Into Cells

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


2

You have worked long and hard on your page design, including a couple of tables that are just right. Then, along comes a need to add a bit more text into one of the tables. The result is that the text in a cell wraps and pushes everything else down a bit. Now your whole design is thrown off! You long for a way to automatically adjust the size of the text in a cell so you won't have the wrapping and pushing occur.

If you are using Word 2000, Word 2002, or Word 2003 there is a built-in option that may do the trick. Simply follow these steps:

  1. Select the cell or cells that you want to format.
  2. Choose Table Properties from the Table menu. The Table Properties dialog box is displayed.
  3. If necessary, select the Cell tab. (See Figure 1.)
  4. Figure 1. The Cell tab of the Table Properties dialog box.

  5. Click on the Options button. Word displays the Cell Options dialog box. (See Figure 2.)
  6. Figure 2. The Cell Options dialog box.

  7. Make sure the Fit Text check box is selected.
  8. Click on OK to close the Cell Options dialog box.
  9. Click on OK to close the Table Properties dialog box.

What Word does is to decrease the apparent size of the text so that everything fits. Word decreases the width of the text by "scrunching" (a highly technical term) the text together horizontally, without adjusting it vertically.

If you are using Word 97, there is no inherent way to accomplish the task. Word doesn't provide any properties you can check to determine the width of various characters, each of which could be different sizes and have other attributes. You can, however, create a macro that may help you by displaying the width of a text string in points or inches. For instance, the following VBA macro displays an input box so you can input your string, displays the Font dialog box so you can specify font and point size, and then displays the width of the resulting string.

Sub GetStringLength()
    Dim sngInitPos As Single
    Dim sngEndPos As Single
    Dim strText As String
    Dim sngLength As Single

    strText = InputBox("Enter the string whose length you want to determine")
    Documents.Add
    Dialogs(wdDialogFormatFont).Show

    sngInitPos = Selection.Information(wdHorizontalPositionRelativeToPage)
    Selection.InsertAfter strText
    Selection.EndOf
    sngEndPos = Selection.Information(wdHorizontalPositionRelativeToPage)
    sngLength = sngEndPos — sngInitPos

    MsgBox "Your string has a length of " & sngLength & _
        " points, or " & PointsToInches(sngLength) & " inches."
    ActiveDocument.Close savechanges:=False
End Sub

The only difficulty with this macro, of course, is that it isn't "automatic." For instance, it won't adjust the size of a text string to the maximum size possible to fit within a cell. In the long run it may be easier to just experiment with different font sizes for information in the cell until you find the right size for your needs.

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 (3780) 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: Fitting Text Into Cells.

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

Removing Items from a Context Menu

Context menus appear when you right-click an item in Excel. If you want to modify the menu that appears, the way to do so ...

Discover More

Noticeable Delays when Switching Documents

Do you notice a certain "slowness" that occurs when you switch between document windows in Word? There could be any ...

Discover More

Changing the Line between Text and Footnotes

When your document includes footnotes, Word adds a line between the main text and those footnotes so that they are ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (menu)

Blank Lines before Tables

Adding a blank line before your table is easy, but Word's behavior as you attempt to make the insert can depend on where ...

Discover More

Quickly Inserting Table Rows

Need to pop a few extra rows into a table? It is easy to do using the same tools you used to create the table in the ...

Discover More

Table Won't Flow to Second Page

Have you ever created a table that never seems to flow to a second page, even when it should? This could be caused by any ...

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 9 - 8?

2022-01-17 12:44:28

Marcel Waldner

What I am Looking for is to decrease the text size only if the cell is full, when I do select the "fit text" option it spaces the text with an enormous space when I only have 2 letters or numbers, is that possible with Word?


2019-06-02 12:05:55

Blake

How to toggle the "fit in cell" options check box?: Instead of opening up Table Properties and jumping through all the clicks necessary to get the the cell tab, checking or unchecking the "fit in cell" checkbox, then ok'ing a couple of times and completing a very time consuming and annoying 7 click process for something I do hundreds of times a day on a particular document, I need to make a shortcut. I can't figure out how to do that. I have created an Open Table Properties shortcut, but that only gets me partway to doing what I want to do with a simple shortcut which is to toggle that darn "fit in cell" checkbox. Please help. Word 2016 for Mac btw


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.