Hi,
I am converting an image which is built during runtime to an ImageStream,
Stream Image_stream = new MemoryStream();
doc.MailMerge.FieldMergingCallback = new HandleImageMerging(Image_stream);
private class HandleImageMerging : IFieldMergingCallback
{
private Stream xImages;
public HandleImageMerging(Stream iStream)
{
xImages = iStream;
}
public void ImageFieldMerging(ImageFieldMergingArgs e)
{
if (e.FieldName.Equals(“PictureFileName”))
{
e.ImageStream = xImages;
}
}
public void FieldMerging(FieldMergingArgs e)
{
}
}
My Problem is that word document that is produced displays the image which appears to be not visible. Upon clicking randomly near the image mergefield location a dotted picture box appears in that place. On going into the picture box properties and setting the Layout text wrapping to “Square” the image becomes visible. How do i control this layout from code also how do i make sure the image fits in the table cell where the image mergefield is present.