Free Support Forum - aspose.com

Will Aspose Words support replacing text with images and tables?

I was wondering if Aspose Words could open a Word file, and replace certain keywords with either an Image or Table (I understand this is possible with text).

For example, if I have a Word document, I would like to search for the text <%companyLogo%> and replace that text with an image. I would also like to search for <%userList%> and replace that text with a Word table. Is this supported in Aspose Words, and if so, how would I accomplish this? Thanks for your time.

Yes, it can be done using Document.Range.Replace with replace evaluator. See related articles in our Programmer's guide and API reference.

The example for replacing text with image was recently discussed here:

http://www.aspose.com/Community/forums/thread/55299.aspx

The example for replacing text with table can be found here:

If you have further questions on this issue please don't hesitate to post them. I will be happy to help you.

Best regards,

From what I can find, Range.replace() will replace a string with another string. With the link you included, you can replace an image with an image.

I was wondering if you can replace a string with an image, and replace a string with a table. Is this at all possible? Thanks again.

I have updated my post above above with the correct links.

Best regards,