Reply
 
Thread Tools Display Modes
  #1   Report Post  
Arlan
 
Posts: n/a
Default VBA command to return the active cell in a Word table

In Word 2002 (XP) how can you determine via VBA what cell in a Word table has
the cursor in it?
  #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
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. Rachel King Microsoft Word Help 38 August 21st 09 09:54 PM
Underscore (_) will not always display in RTF files (Word 2002). David A Edge Microsoft Word Help 6 June 14th 05 10:39 AM
Is there a Fast Search in Word? [email protected] New Users 14 February 11th 05 08:43 PM
how can you create quickwords in MS Office Word 2003 Christine S Microsoft Word Help 4 February 8th 05 03:01 PM
Converted document from WordPerfect. New footnotes are not being. C Lowman Microsoft Word Help 1 January 26th 05 10:19 PM


All times are GMT +1. The time now is 05:39 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"