Test for a blank line
I am trying to come up with some code to test a situation.
I have a table which may, or may not have some text in a particular cell. I want to put another table within the cell. The new table would happen after the point where the user had placed the cursor. (Basically a box within a box). The table would be on the next line after the text. Alternatively, if there was no text, it would be at the top of the cell.
There are two situations I want to test for.
1. If the selection is at the end of the text, I want to check if there is a blank line below the selection and if not add a line. - Selection.InsertAfter Chr(11)
2. If the selection is on a blank line, I will add the inner table on that line.
The creation of the inner table works fine. Just having trouble getting to the right place to insert the table.
|