# Thread: Get Table Row Height (2000)

1. ## Re: Get able Row Height (2000)

Word also has a PointsToCentimeters function, at least Word 2002 VBA does. If that isn't available in Word 2000, you can create it yourself:

Public Function PointsToCentimeters(Pts As Single) As Single
PointsToCentimeters = Pts / 72 * 2.54
End Function

Since 72 points = 1 inch by definition, and 1 inch = 2,54 cm, you can convert from points to centimeters by dividing by 72, then multiplying with 2.54 (or you can divide by 72 / 2.54 = 28.35)

2. ## Get Table Row Height (2000)

Hi, I have a macro that asks user for input and sets the current table height to the number input :

Sub inputSize()
Dim sSize As Single
sSize = InputBox("Enter row size")
If inTable = True And sSize > 0 Then
Selection.Rows.HeightRule = wdRowHeightExactly
Selection.Rows.Height = CentimetersToPoints(sSize)
End If
End Sub

(inTable is a function to check that the current selection is within a table)

is there a way of returning the current height of the row in centimetres rather than points, as when i do

MsgBox Selection.Rows.Height

i get it in points.

3. ## Re: Get able Row Height (2000)

Yes, it has that function. Thanks. I was trying to do

Msgbox Selection.Rows.Height(PointsToCentimeters)

but i got it now with

Round(PointsToCentimeters(Selection.Rows.Height), 2)

Cheers

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•