Inserting Bookmarks

Hi Roman,

Thanks for your support. Bookmark insertion is working fine now. By this we can insert a bookmark in anywhere in the document. But the MoveToBookmarks methods brings the control to the place between the bookmark tag. If we want insert a new bookmark after the selected bookmark, then we can’t. For example, I have to Bookmark place like below

1. BookMark1 Start

Bookmark 1 Started Here
Bookmark1 End

2. Bookmark2 Start

Bookmark 2 here
Bookmark2 End


Now I want to add one more clause between 1 and 2 and the result will be like the following:

1. BookMark1 Start

Bookmark 1 Started Here
Bookmark1 End

2. Bookmark3 New Start

Bookmark 3 New here
Bookmark3New End

3. Bookmark2 Start

Bookmark 2 here
Bookmark2 End

I am trying to find out the ‘Bookmark2 Start’ position by MoveToBookmark method and then insert the new one. But the problem here is, the new one get inserted between the tag of 2nd one like below:

1. BookMark1 Start

Bookmark 1 Started Here
Bookmark1 End

3. Bookmark2 StartBookmark3 New Start

Bookmark 3 New here
Bookmark3New End

Bookmark 2 here
Bookmark2 End


This is the problem I have faced. Is there any other method through which I can move before the bookmark start place or after the bookmark end place?

I more thing, should we start the numbering of the paragraph format from a defined number?

Thanks

Prasenjit

I’ve added DocumentBuilder.MoveToBookmark overload that allows to move to a position before or after bookmark start or end in Aspose.Word 1.6.7 hotfix, ready to download.