Bookmark does not retain the text formatting


#1

Hi, I am currently using Aspose.Word to handle mergefields and bookmark, the problem that I encountered is that the bookmark text did not use the format that was set by the user. It uses the format of the near by text. I know that you can go around by using the document builder object to write the text and you can specify the formatting, but this won't work for us since we have thousands of bookmark, and they have different formatting. Please let me know if there is another way where i can use the bookmark.Text property.

Thank you very mucn.


#2

Hi,

Thank you for considering Aspose.

If you have one run of text inside a bookmark (i.e. the inner text is formatted similarly), then the new text inserted using Bookmark.Text should use that formatting, too. If you have multiple runs of text inside (differently formatted text), then there's nothing to do since we don't know how this formatting should be applied to the new text. You can attach a sample document containing bookmarks which (as you think) behave incorrectly.