Hi,
1) Get the bookmark using Range.Bookmarks property.
Bookmark bookmark = doc.getRange().getBookmarks().get("bookmarkName");
2) If bookmark is not null, move the cursor to the bookmark location using DocumentBuilder.moveToBookmark method
3) Remove the bookmark using Bookmark.remove method and insert the contents using DocumentBuilder.write method
Please read following documentation links for your kind reference.
http://www.aspose.com/docs/display/wordsjava/DocumentBuilder+Overview
http://www.aspose.com/docs/display/wordsjava/Moving+the+Cursor
Hope this helps you. If you still face problem, please share the input and expected output documents here for our reference. We will then provide you more information about your query along with code.
thank you for your solution, it’s worked form me.