Microsoft KB Archive/89807

{|
 * width="100%"|

How to Determine the Position of a Cell Within a Table

 * }

Q89807

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

-

SUMMARY
To determine the position (row and column number) of a cell in a table, follow the procedure below or use the macro below it.

Procedure

 * 1) Position the insertion point in a table cell.
 * 2) From the Table menu, choose Row Height. The row number is &quot;X&quot; in the Height Of Row  box title. Choose the Cancel button.
 * 3) From the Table menu, choose Column Width. The column number is &quot;X&quot; in the Width Of Column  box title. Choose the Cancel button.

Macro
  Sub Main MaxCol = SelInfo(18) Row = SelInfo(13) Col = SelInfo(16) If(Row = - 1) Or(Col > MaxCol) Then Print &quot;Selection not in Table&quot; Else Print &quot;Row &quot; ; Row ; &quot;, Column &quot; ; Col End If  End Sub To use the above macro, position the insertion point in a table cell and run the macro. The row and column number appear on the status line in the following format:

"Row x, Column x" If the cursor is not in a table cell when you run the macro, the following error message appears on the status line:

Selection not in Table

NOTE: Information provided in this document is provided &quot;as is&quot;without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Additional query words: winword2 number 3.10 win31 word6 winword 2.0 2.0a 2.0a-CD 2.0b 2.0c 6.0 6.0a 6.0c

Keywords : kbtable

Issue type :

Technology :