Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
Ed was telling us:
Ed nous racontait que : Is there a way using VBA to identify the column and row of the Word table cell containing the insertion point, or that has been selected? (An equivalent to Excel's ActiveCell) Try the following. Note that if you are dealing with tables containing merged cells, then it will not work. '_______________________________________ Dim IndexCol As Long Dim IndexRow As Long With Selection If Not .Information(wdWithInTable) Then MsgBox "Selection must be in a table cell.", _ vbCritical, "Invalid Selection" Exit Sub Else IndexCol = .Columns(1).Index IndexRow = .Rows(1).Index MsgBox "The coordinates of the top left cell of " _ & "the current selection is row " & IndexRow _ & " and column " & IndexCol & ".", _ vbInformation, "Active Cell" End If End With '_______________________________________ -- Salut! _______________________________________ Jean-Guy Marcil - Word MVP ISTOO Word MVP site: http://www.word.mvps.org |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Table cell alignments | Microsoft Word Help | |||
word table cell resize or word table cell size change or word table change cell size | Tables | |||
Table Cell not Centered Correctly (Too far left) | New Users | |||
Insertion point after section break | Microsoft Word Help | |||
Indenting a bullet list in a table cell. | Tables |