Hello,
I think to have found a bug related to the appendrtf function.
If I use AppendRTF on an existing paragraph of an existing word document, I can see a new Item and ChilderObject for the paragraph.
Instead if I use AppendRTF on a new Paragraph, I cannot see any new Item or ChilderObject, but finally the generated word contains the expected RTF part converted in word.
My problem is that I cannot manipulate the just added RTF if I cannot see the related Item.
ex.
...
int oldCount = p.Items.Count;
Paragraph p = txtrange.OwnerParagraph;
p.AppendRTF(rtf_string);
int newCount = p.Items.Count;
//here I can see the new appended item oldCount < newCount
instead if I use this code:
int oldCount = p.Items.Count;
Paragraph p = document.Sections[0].AddParagraph();
p.AppendRTF(rtf_string);
int newCount = p.Items.Count;
//here I CANNOT see the new appended items. oldCount = newCount == 0
Moreover, I cannot find a suitable way to INSERT an RTF document between two textrange. The idea was to create a new paragraph, append the RTF to it, then copy all the items in the new paragraph, to the required position between the textrange in another paragraph. The above described problem regarding the missing items, does not permit such approach.
Can you help me?
Regards