View Single Post
 
Old 01-16-2023, 08:38 AM
AlanCantor AlanCantor is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Nov 2020
Posts: 154
AlanCantor is on a distinguished road
Default

Thank you for the helpful responses!

While testing your code samples, and more of my own, I began to question the requirement that the cursor be inside a table. For example, what if the cursor is immediately AFTER a table? That should be OK.

Through trial-and-error, I learned that this instruction...

Code:
    Selection.Tables(1).Select

...selects the table above when the cursor is on the blank line that follows a table.

My guess is that the blank line inherits the formatting carried by the end-of-table marker. It's as if the blank line is programmatically part of the table that precedes it. But the blank line doesn't get selected.


I learned a lot today!
Reply With Quote