3 Effective Ways to Remove Unwanted Spaces in Table Cells in Your Word Document

In the following article, we would like to offer you 3 effective ways to remove unwanted spaces in table cells in your Word document.Remove Unwanted Spaces in Table Cells

Now and then, we need to inset a table to hold texts and data. But we often have to adjust the table size after entering texts and data. And sometimes, we will get a table with unwanted spaces in cells after adjusting its size, such as below:Unwanted Spaces in Cells

In the example above, there is a blank line below the text in each cell. But we are unable to get rid of it simply by pressing “Delete”. Instead, we have to use other workarounds.

Method 1: Narrow Down the Row Height Manually

  1. First and foremost, check if there are removable blank lines in cells. If any, delete them first.
  2. Then put cursor over the bottom line of a table row. Wait until cursor changes to the sign of double horizontal lines with 2 arrows.
  3. Next click and drag the bottom line up until the unwanted space disappears.
  4. Repeat step 2 and 3 on other rows in the table whose height needs to resize.

Here is the result:Effect of Removing Unwanted Spaces in Table

Method 2: Disable “Specify height” Function

  1. First of all, click on the cross sign on the upper-left to select the entire table.
  2. Then right click and choose “Table Properties”.Right Click->Choose "Table Properties"
  3. In “Table Properties” box. Click “Row” tab first.
  4. Next clear “Specify height” box.
  5. Lastly, click “OK”.Click "Row" ->Clear "Specify height" Box->Click "OK"

The effect is as same as that in method 1.

Method 3: Use Word Macro

  1. To start off, click “Developer” then “Visual Basic” to open VBA editor. If the “Developer” tab is not available in the Ribbon, press “Alt+ F11” instead.Click "Developer"->Click "Visual Basic"
  2. Next, go to create a new module. Click “Normal” in the left column.
  3. Then click “Insert” at the menu bar.
  4. Choose “Module” on the drop-down menu.Click "Normal"->Click "Insert"->Click "Module"
  5. Next double click on module to open it.
  6. Now paste the following codes on the coding area:
Sub RemoveSpacesInTables()
  Dim objTable As Table
  Dim objDoc As Document
  Set objDoc = ActiveDocument
  With objDoc
    If .Tables.Count > 0 Then
      For Each objTable In .Tables
        Selection.Rows.HeightRule = wdRowHeightAuto
        Selection.Rows.Height = InchesToPoints(0)
      Next objTable
      MsgBox ("This document contains no table.")
    End If
  End With
End Sub
  1. Finally, click “Run” or execute the codes pressing “F5”.Paste Macro->Click "Run"

This macro shall work on all tables in a document and remove unnecessary spaces.

Comparison of 3 Methods

Methods Advantages Disadvantages
Method 1: Narrow Down the Row Height Manually Best for a document with only a few tables or tables with a few rows. 1.        You have to pull up the row line up manually and repeatedly.

2.        Not the nest way for multiple tables

Method 2: Disable “Specify height” Function 1.        No need to manually pull the line up

2.        Quicker than method 1

You can only deal with one table at a time.
Method 3: Use Word Macro 1.        The quickest way

2.        Able to process multiple tables at a time

It requires the use of a macro.

Once a Document Corrupts

It’s not rare to get a corrupted document now and then. However, the moment your document is damaged, it’s also the time when fear sets in. Therefore, just to be on the safe side, the quickest course of action is to obtain a repairing tool to fix docx so as to prevent it from further damage.

Author Introduction:

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

One response to “3 Effective Ways to Remove Unwanted Spaces in Table Cells in Your Word Document”

  1. Just want to say your article is as amazing. The clearness in your post is simply nice and i could assume you are an expert on this subject. Well with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please carry on the enjoyable work.

Leave a Reply

Your email address will not be published. Required fields are marked *