I learned using collapsing ranges when constructing entire documents on this forum a while back. I love the way it works and especially the speed contra building from selection. However, I'm having a hard time now with a table cell.
Usually I collapse the entire document range, add text or whatever I need to add. Then collapse range and add more.
Now, I need to add some varying text in a single table cell. I have this:
<created the table tbl_prices>
With tbl_prices.Rows(2).Cells(3).Range
.Collapse 0
.Text = "First line of text"
.InsertParagraphAfter
.Collapse 0
.Text = "Second line of text"
End with
When this is executed, only the second survives. Why is that?
The reason I need to break this up, is because I need to make some of it bold and more. To my knowledge that cannot be done, had I typed all the text with a single .Text
On a larger scaler (collapsing the entire document range) it works perfectly, but in that table cells, it's like it ignores the .Collapse
Any help or suggestions are appreciated.
Usually I collapse the entire document range, add text or whatever I need to add. Then collapse range and add more.
Now, I need to add some varying text in a single table cell. I have this:
<created the table tbl_prices>
With tbl_prices.Rows(2).Cells(3).Range
.Collapse 0
.Text = "First line of text"
.InsertParagraphAfter
.Collapse 0
.Text = "Second line of text"
End with
When this is executed, only the second survives. Why is that?
The reason I need to break this up, is because I need to make some of it bold and more. To my knowledge that cannot be done, had I typed all the text with a single .Text
On a larger scaler (collapsing the entire document range) it works perfectly, but in that table cells, it's like it ignores the .Collapse
Any help or suggestions are appreciated.