View Single Post
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Sat, 18 Jun 2005 15:44:02 -0700, "Arlan"
wrote:

In Word 2002 (XP) how can you determine via VBA what cell in a Word table has
the cursor in it?


Dim RowNum As Long, ColNum As Long
If Selection.Information(wdWithInTable) Then
RowNum = Selection.Cells(1).RowIndex
ColNum = Selection.Cells(1).ColumnIndex
MsgBox "Row = " & RowNum & vbCr & _
"Column = " & ColNum
Else
MsgBox "Not in table"
End If

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org