View Single Post
  #1   Report Post  
Fred Holmes
 
Posts: n/a
Default Obtaining the Width of a _Table_

Word 2003, Win XP

The following code very nicely gets the width of a cell/column in a
table.

If Selection.Information(wdWithInTable) = True Then
MsgBox "The Width of the Cell is " & _
PointsToInches(Selection.Cells(1).Width) & " inches."
End If

But if I want to get the width of the whole table

Selection.Tables(1).Width

does not work and returns an "method or data member not found" error
message. Similarly, the following does not work.

Selection.Rows(1).Width

I know I could find the table/row width using a loop that would get
and add the width of each of the columns in the table, but is there a
direct way to get the width of a table/row.

Thanks,

Fred Holmes