We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bookmark inserts new line

I am populating a list of bookmarks in a document based on the value of checkboxes on a menu. The bookmarks are populating but the formatting is incorrect. It looks like inserting text at the bookmark also inserts a line feed.
Here’s my code:

Dim doc As Document = New Document(DocName)
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
If Me.Checkbox.Checked = True Then
builder.MoveToBookmark("chk01", True, False)
End If

Here’s what the line ends up looking like in the document:
_ 1. Document Text Here
It should look like this:
_X 1. Document Text Here
What am I doing wrong?

Thank you for your interest in Aspose.Words.
Please try the same but using another writing method:


Difference between Write and Writeln is that second one adds a new line after the text.

Thank you! It works perfectly now.