Received : 2007/07/25 10:41:50
Message : I want to insert an HTML text into a TextBox shape having Aspose.word rendering the HTML structure and building the text with the right formatting into that TextBox shape.
Unfortunately, the InsertHtml method works only for DocumentBuilder object - I could not find such for a regular shape (so I didn't find an easy way to insert HTML into shape), however, I tried building a dummy DocumentBuilder object and by looking at the results of the DocumentBuilder.InsertHtml method I could see that the HTML content is translated into multilpe run objects under doc.FirstSection.Body.FirstParagraph.Runs[...] - well, this is nice, I though of copying the run objects and inserting them into a paragraph in my TextBox shape, in that way I use a dummy DocumentBuilder that will do the rendering of HTML for me and than I'll copy the resulted run objects, right?
Unfortunately I could not find a way to copy the run objects. Regular assignment does not work since they have created based on different documents, Clone does not work either (trying to clone the whole paragraph) - So I end up looking for help,
>> What is the easiest way to insert an Html text into a TextBox shape that will draw it with the correct formatting?
Thanks.
This message was posted using Aspose.Live 2 Forum