Exception when trying to set Bookmark.Text

Hi!

There is some problem that was introduced in version 3.0.0.0 (it work’s in 2.5.2.0).

The test template is in attachment and here ist the test code:

Document d = new Document(“test1.dot”);
d.Range.Bookmarks[“IF8_Inhalt6”].Text = string.Empty;

Run it and you will get the wxception.

Robik

Hi Robik,

Thank you for considering Aspose.

We’ve logged this issue. Will try to fix it as soon as possible.

In this particular case the problem is caused by the fact that the bookmark starts in an empty paragraph. Please workaround by inserting at least a space character, I will do a proper fix later. Attached is the modified document that works with latest Aspose.Word (get latest, bookmark handling could have been updated since your version).

[bmkstart][space][end of paragrap]
table row
table row
table row
[bmkend]

will do
thanx

Hi,

was this allready fixed in the version 3.1.6.0 ?

Thanx

Robik

Hi,

Sorry, not yet. Proper support for bookmarks around complex content is to be done later.

Hi,



when is this expected to be done? The workaround is no solution,
because we must manually check every new document to apply this
workaround.



Thank you



Robik

Hi,

We are looking into your issue, hopefully it will be resolved soon.

Hi,

did you made any progress?

Thank You

Robert

Sorry I missed your message saying that the workaround is not suitable. I will try to address this bookmark issue in 2 weeks.

Fixed, will go out in the next release Aspose.Word 3.3.5 in a few days.