Hi,
Can you tell me how I can move DocumentBuilder cursor to the place where I have bookmark end located?
Please see the document attached. I open it and try to do the following.
private void ReplaceBookmark(Bookmark bookmark, Document document)
{
var documentBuilder = new DocumentBuilder(document);
documentBuilder.MoveTo(bookmark.BookmarkStart);
documentBuilder.InsertField($"MERGEFIELD TableStart:{repeatingPartId}");
documentBuilder.MoveTo(bookmark.BookmarkEnd);
documentBuilder.InsertField($"MERGEFIELD TableEnd:{repeatingPartId}");
}
What I observe is that the field I insert is placed not where the BookmarkEnd is located in the loaded document, but in the next cell. As a matter of fact It looks like it inserts the field in the next row or if the BookmarkEnd is in the last row, outside the table.
See the files attached, one before running the code and the other after changes.
Thanks,
LukaszBookmarkEnd.zip (18.4 KB)