View Single Post
 
Old 06-21-2022, 04:48 PM
eduzs eduzs is offline Windows 10 Office 2019
Expert
 
Join Date: May 2017
Posts: 253
eduzs is on a distinguished road
Default Simplest way to get row and column number?

Is there a simpler way to get row and column numbers from the current selected cell in a word table with horizontally or vertically merged cells?
I need to retrieve the text of the cell above current selected cell.
This code does not works (works only if I add 1 to column index) cause there's merged cells in the selected row.
Code:
selection.tables(1).Cell(selection.Cells(1).rowindex-1,selection.Cells(1).columnindex).Range.text
Thanks
__________________
Backup your original file before doing any modification.
Reply With Quote