Replacing a text string with an image


We’re evaluating Aspose.Word as a possible replacement for our current
MailMerge process. Currently we provide support for replacing a
text string with an image (bmp/tiff/jpg). For example, the
customer may include something like ‘{MyPicHere}’ and that string needs
to be replaced by the user’s photo. What is the best way to
handle this?




Please see end of this topic where a string was replaced with a table.

Basically, you use Range.Replace to take you to the place in the document and then use custom replace handler and DocumentBuilder.MoveTo and DocumentBuilder.InsertImage to insert the image.


Thanks! That did the trick.