2 Methods to Adjust Contents to Fit in Cells in Your Word Table

In this article, we would like to share 2 easy methods to adjust contents to fit in cells in your Word table.

When deal with a table in Word document, it’s hard to ensure all table cells stay in fixed size. Normally, with more words input in a cell, it will automatically wrap text. Below is an example:Sample of Cell Change

This is surely not eye-catching. How about finding ways to fix a table size but make contents fit it?

Following are 2 ways available:

Method 1: Set a Table One Time

  1. At first, click the plus sign on the upper-left corner of the table to select it.
  2. Then, right click on the selected table.
  3. Next choose “Table Properties”.Select "Table" ->Right Click ->Choose "Table Properties"
  4. Now in the “Table Properties” dialog box, click “Cell” tab first.
  5. Then click “Options” on the right-down corner of the box.
  6. Now you will open the “Cell Options” dialog box. Go to “Options” part, and clear “Wrap text” box.
  7. And check “Fit text” box instead.
  8. Then click “OK”.
  9. And remember to click “OK” in “Table Properties” dialog box, too.Click "Cell" ->Click "Options" ->Check "Fit text" ->Click "OK" in Both Dialog Boxes

Now the contents layout will change accordingly. Here is what you will get:Effect

Method 2: Utilize VBA Codes

The VBA editor in Word allows you to type codes to customize your own Word features to get jobs done in a quick and neat way. So you can comfortably use codes to make the miracle happen.

  1. First and foremost, click “Developer” tab. If you don’t have it already, you can refer to this article: How to Insert Background Music into Your Word Document
  2. Then, click “Visual Basic” to open VBA editor.Click "Developer" then Click "Visual Basic"
  3. In VBA editor, find the project with document name after it and click “ThisDocument”.
  4. Next, click “Insert” on toolbar.
  5. And choose “Module” on the menu.First Click "ThisDocument" ->Click "Insert" ->Click "Module"
  6. Now you will open the editing area, just paste codes there:Paste Codes on Editing Area ->Click "Run"
Sub AutoFitTextForAllTableCells()
  ' Check if there are any tables in the document
  If ActiveDocument.Tables.Count > 0 Then
    Dim objTable As Table
    Dim objCell As Cell

    ' Process each cell in each table and set the options accordingly
    For Each objTable In ActiveDocument.Tables
      For Each objCell In objTable.Range.Cells
        objCell.WordWrap = False
        objCell.FitText = True
      Next
    Next
  Else
    MsgBox("There is no table in this document!")
  End If
End Sub

Prepare for the Impending Failure

Incidents will always catch you off guard. So the best way is to take time and make preparation. Precautious measures can include backing up files and shelling out some money to get a corrupt Word doc recovery tool. Since data loss can happen to anyone at anyplace, it’s time to do something.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including Excel data error fix tool and pdf repair software products. For more information visit www.datanumen.com

Comments are closed.