I want to change the text af a paragraph. Thought it is totally simple – until there was a table.
Actually it is just one line of code:
activeDocument.Paragraphs[2].Range.Text = "abcd" + "r";
Word Document before
line1
line2
line3
Word Document after
line1
abcd -> OK: text in paragraph replaced
line3
But with table it becomes strange (see below). The second paragraph is moved inside the table.
Word Document before
line1
line2
+-------+
| line3 |
+-------+
Word Document after
line1
+-------+
| abcd | -> NOK: text in paragraph replaced - but moved also into table
| |
| line3 |
+-------+
how can i prevent the paragraph from being moved to the table?