Using TextBoxes instead of Bookmarks?

Hello

We are currently using bookmarks as placeholders in Word documents. Our Application replaces the text in certain bookmarks with HTML Code. This approach works, but is a bit fragile, because the users can edit the documents before our application replaces the bookmarks. Sometimes, the users move the bookmarkStart and bookmarkEnd Nodes to inappropriate places in the document, which causes the replacement process to fail.

So I was very happy to see that the latest Version of Aspose.Words supports TextBox Shapes.

I want to use a Textbox shape instead of a Bookmark. This has the following advantages:

  • Because a Shape is a self-contained object, it is "unbreakable", i.e. it eighter exists or not.
  • I can simply put HTML into the shape. Even if the HTML contains tables, I can repeat this many times with predicable results.

Using WinWord, I can easily emulate this solution. I can set an option on the TextBox which causes it to grow/shrink depending on how much Text is contained in the TextBox.

Using Aspose, however, I cannot set this option, because I don't find a flag which I can set to have the TextBox grow/shrink depending on how much text is contained.

What Options do I have ?

Kind Regards
Matthias

Hi Matthias,

Thank you for that nicely prepared and comprehensive request Smile [:)] I see the options you need are not yet exposed. I will discuss it with Roman and we will expose them soon I believe. I have logged your request as issue #1382.