I am evaluating your product for my needs and had a question about merging an image. I noticed from the tutorials I must add the prefix ‘Image:’ to my merge fields for images. My image is displayed when I execute the mail merge, but the field name also remains on the document. Why is this? I suspect it isn’t matching the name from my source and therefore is ignoring that MergeField. What can I do make the image display while still removing the MergeField?
Here is my section of code:
Dim doc As New Document(_settings.ReportPath & "\MAIN AND SERVICE LINE INSPECTION # 1.doc") _dbase.Query = "Select * from Form" & Mid(ComboBox1.SelectedValue.ToString, 1, 8) & " where dtaID = ‘" & lstForms.SelectedValue.ToString & "’" Dim CurRow As DataRow = _dbase.ExecuteSql(Dbase.AccType.Row) ' Set up the event handler for image fields. doc.MailMerge.FieldMergingCallback = New HandleMergeImageFieldFromBlob() doc.MailMerge.Execute(CurRow)
This message was posted using Page2Forum from How-to: Insert Images from a Database - Aspose.Words for .NET