Free Support Forum -

Problem with aspose word document

We have had this application for the past 3/4 years and the word document keeps changing and so we had to change the merge fields etc changeing. The last change was done in May and it was working fine. We had to put the application onto a new server and since it has not been wokring. We have put other applications with aspose word docs onto the new server and it is all working fine. Tried to copy the license and dlls from the wroking application but still no luck. It opens up the word document without any of the mergefields. Please help.


Thanks for your inquiry. Maybe there is something wrong with template document. Please attach your template document for testing.

Best regards.

OK I am attaching the document. But the same doc was working bfore

Thanks for additional information. Yes, I see that document works fine. What do you mean by "It opens up the word document without any of the mergefields"? Maybe it means that output document is empty. If so then I think you should check your data source.

I used the following code for testing.

//Open template

Document doc = new Document(@"473_110666_Carlyon\in.doc");

//Get array of field names

string[] names = doc.MailMerge.GetFieldNames();

//Excute mailmerge

doc.MailMerge.Execute(names, names);

//Save document


Best regards.

The output documents should show the patient details which are merge fields, but it is not showing up. For previous version of word document the mergefields are outputted. But this is the latest version of the document which was working fine in the other server. The code has not been changed, and the database is also the same.

If you get document without any data then reason is the empty data from data source. Make sure that there is any data. Step through in the debugger.

Also, please attach your output document.

Best regards.

The datasource is fine, Have checked that, as it works for the previous versions of the document. I am attaching the output document


Thank you for additional information. Maybe field names in the document and in the database do not match. Please check this. Also please make sure mail merge is executed.

Best regards.

Yes have checked all that. The field names are just patient detials which were in the previous document and except that the layout of the document has changed, nothing else has changed. The database has been ther for the past 3/4 years. The mail merge does execute. Has it got anything to do with word, dll etc

I do not know other reasons why this could not work. Can you create sample application that will allow me to reproduce this problem?

Best regards.