I have attached sample document with 2 bookmarks “bm1” and “bm2”. First bookmark includes special paragraph character and second doesn’t.
And there is an issue when I try to paste paragraphs after first bookmark. Content is not pasted directly after bookmark but after next paragraph. But all fine if I try to do the same with second bookmark.
On the screenshots it’s shown that BookmarkEnd is placed on the next paragraph. Is it correct?
Or can you please explain how to exclude last paragraph character from bookmark programmatically?
You are facing the expected behavior of Aspose.Words. The BookmarkEnd node of “bm1” is after the paragraph break mark (at the start of paragraph 3). Please check the attached DOM image for detail.
Please use following code example to get the desired output. Following code example inserts the BookmarkEnd node at the end of paragraph 2.