We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word MailMerge- How do to set Image Size?

I have word template which has image field. The name of the field is "Signature". I'm NOT using IFieldMergingCallback interface to set the actual value, instead the DataTable has a column with the name same as field name "Signature", and data type is byte array. so everything works fine when i call Execute method. But sometime the actual image is large

how do i set the size of that image field?


Thanks for your inquiry. You can set the width/height of images by using DocumentBuilder.InsertImage method during mail merge. Please see the following code snippet:

private class HandleMergeImageFieldFromBlob : IFieldMergingCallback
void IFieldMergingCallback.FieldMerging(FieldMergingArgs e)
public void
if (args.FieldName.Equals(“testField”))
DocumentBuilder builder = new

builder.InsertImage(args.FieldValue.ToString(), 200, 200);

Moreover, you can find documentation of DocumentBuilder.InsertImage method overloads here:

I hope, this will help.

Best Regards,