Formatting Issues

Find the Actual Height of an Auto-Fit Table Row in Microsoft Word

Rana GarciaRana Garcia Nov 22, 2026 868 views

Question details

Find the displayed height of a Word table row that automatically fits its contents.

Find the Actual Height of an Auto-Fit Table Row in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
The user wants to determine the height of an automatically sized table row.
Observed behavior
Table Properties may show a height of zero even though Word displays the row at a height determined by its contents.
Before you start

Click inside the row and check Table Properties > Row to see whether a height is specified. For the VBA estimate, use a row followed by another row on the same page, preferably in a simple table without merged cells.

Solution 1Recommended

Estimate the Row Height with a Word VBA Macro

Use this method to estimate the height of an automatically sized row when Word does not display a useful value.

The macro compares the vertical positions of the text insertion points in the first cells of the selected row and the following row. The difference is an estimate, not necessarily the exact distance between row borders; cell margins, vertical alignment, merged cells, and layout can affect it.

1
Select the row

Click inside the row you want to measure. Do not choose the final row, and make sure the following row starts on the same page.

2
Open the VBA editor

In desktop Word, open the Developer tab and select Visual Basic, then choose Insert > Module. If Developer is hidden, enable it through Word's ribbon customization settings.

3
Add the macro

Paste this code into the module: Sub EstimateRowHeight() Dim tbl As Table Dim rowNum As Long Dim firstPos As Range, nextPos As Range Dim y1 As Long, y2 As Long If Not Selection.Information(wdWithInTable) Then MsgBox "Click inside a table row first." Exit Sub End If Set tbl = Selection.Tables(1) rowNum = Selection.Rows(1).Index If rowNum >= tbl.Rows.Count Then MsgBox "Select a row that has a following row." Exit Sub End If Set firstPos = tbl.Rows(rowNum).Cells(1).Range firstPos.Collapse wdCollapseStart Set nextPos = tbl.Rows(rowNum + 1).Cells(1).Range nextPos.Collapse wdCollapseStart If firstPos.Information(wdActiveEndPageNumber) <> nextPos.Information(wdActiveEndPageNumber) Then MsgBox "Both row starts must be on the same page." Exit Sub End If y1 = firstPos.Information(wdVerticalPositionRelativeToPage) y2 = nextPos.Information(wdVerticalPositionRelativeToPage) If y1 < 0 Or y2 < 0 Or y2 <= y1 Then MsgBox "Word could not determine a usable position." Exit Sub End If MsgBox "Estimated row height: " & (y2 - y1) & " points" End Sub

4
Run the macro

Return to the document, click inside the target row, and run EstimateRowHeight from Developer > Macros. Read the estimate in points in the message box.

Estimate the Row Height with a Word VBA Macro
Use a simple table: The macro may fail or give a misleading estimate for merged cells or complex layouts. Run only macros you trust.
Free Microsoft Office alternative

Edit Word Tables with WPS Writer

WPS Writer is a free, lightweight alternative for working with Word documents. Its familiar interface and format compatibility make it easy to move existing files into WPS, though it does not fix Word's row-height display.

Edit and format tables in a familiar word-processing interfaceOpen and save Microsoft Word DOC and DOCX filesMove existing Word documents into a lightweight Office alternativeUse free document-editing tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word show zero for my table row height?

A zero value can indicate that no fixed height is specified. Word calculates the displayed height from the row's contents and formatting.

Can the macro measure the last row of a table?

The macro above needs a following row for its position comparison, so it cannot measure the final row. Select another row or use a different measurement method.

Why is the macro result only an estimate?

It compares text positions in consecutive rows, not the row borders. Differences in cell margins or vertical alignment can affect the result, and merged cells or page breaks can make it unreliable.

How do I make a Word table row a specific height?

Right-click the row, select Table Properties > Row, check Specify height, and enter a value. Choose Exactly for a fixed height or At least to allow the row to expand.