#1
|
|||
|
|||
How do I determine rows in a table that has verticle merged cells?
I am encountering an issue in that I can not use the "normal" way of determining rows in a table, and having to use the Range object. I get the total rows in the table, using Range.Rows.Count.
My VBA code goes through each cell in the row, from top to bottom. The main columns that I trigger off of are Column 1 and Column 4. Column 1 is the merged cell, and when I loop through, I can not seem to find a way to have the Range object tell me the current row that I am on. I need to determine the row because there is text in Column 3 that does not show up via the direct Word search and Range.Text(It is set as either RTableHeader, RHeading2 in the Styles menu)., and am using VBA to regenerate the text in this column. I am actually extracting some of this data for comparison purposes. Does anyone have any ideas, or need further clarification? Thank you. |
#2
|
||||
|
||||
Without seeing your code, it's impossible to suggest any particular revisions. That said, you can get both the RowIndex and ColumnIndex for any cell. See, for example, the Identifying Table Cell Addresses 'Sticky' thread at the top of the Word Tables forum: https://www.msofficeforums.com/word-...addresses.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
range.rows |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting table to text (and back) with carriage returns in cells, split and merged cells | ndajko | Word | 5 | 11-04-2019 07:53 AM |
VBA color of visible gridlines of tables word (with some merged cells in first rows) | Alvaro.passi | Word VBA | 0 | 07-18-2017 09:11 AM |
VBA merging cells and counting Merged rows | Snaybot | Excel Programming | 2 | 11-09-2015 03:56 AM |
Table will not allow sorting because "cells are merged". I can't find the merged cells. | wendyloooo | Word Tables | 1 | 05-26-2015 01:19 PM |
Set range for merged Word table cells? | tinfanide | Word VBA | 1 | 02-06-2012 05:57 AM |