Can someone tell me what I did wrong?
Here’s what I did:
Dim doc As Aspose.Words.Document = word.Open(cDocFileIn)
'Fill the fields in the document with user data.
Dim Confirm As DataTable
Confirm = GetDt("Select * from confirm order by bookid")
doc.MailMerge.Execute(Confirm)
doc.MailMerge.DeleteFields()
doc.Save(cDocFileOut)
Dim rend As Aspose.Words.Viewer.DocumentRenderer
rend = New Aspose.Words.Viewer.DocumentRenderer(cDocFileOut)
rend.PrinterSettings.PrinterName = "PrintToFile"
rend.PrinterSettings.PrintToFile = True
rend.Print()
Please provide a stack trace of the exception.
Also, please attach the initial document and the document saved after MailMerge. We need these to be able to reproduce the problem.
Best regards,
When you edit the post look at the several tabs at the top of the page, under Reply to an Existing Message text. To attach documents choose Options tab. The file attachment can be done there.
Sales team will probably forward the document to me but it can take some time before it will happen. So it is better to attach the document here. Please note that all attachments in the forum are private and are accessible only to the author of the post or Aspose staff members. So you don’t need to worry about confidentiality.
Best regards,
Thanks for providing additional info. We will try to fix this error as soon as possible so that it could be included in the next release which will be published in a few weeks.
Please note that normally we don’t fix errors in Aspose.Words.Viewer beta as it is no longer supported and not recommended for use in the production environment. We are working on entirely different implementation of the rendering engine now. More on that here:
<A href="
In this particular case, however, the error looks like it can be fixed without major code update so we will attempt to fix it.
We are happy to tell you that the new Rendering Engine has replaced the “old Viewer Beta”. The Rendering Engine can print, save as images or draw onto .NET Graphics object any document page.
Please see Aspose.Words documentation to learn more about new features.