We have problems with generated docx or xps files using the Aspose.Words 9.2 evaluation version.
Our process:
loading a document tamplate(e.g doc or docx file) mailmerge some fields save the document in a memory or file stream in different output formats: doc, pdf, docx, xps
The generated docx or xps files causes problems. Office 2010 shows a dialog, that the document is corrupted or the contant causes problems.
Attached you will find the generated docx-file.
i hope you can help an have a solution.
code example:
// Get Document Template
Aspose.Words.Document doc = new Aspose.Words.Document(docTemplate.GetFile());
…
// MailMerge for all fields
doc.MailMerge.Execute(dt.Rows[0]);
…
SaveFormat docFormat = (SaveFormat) Enum.Parse(typeof(Aspose.Words.SaveFormat), fileType, true);
// copy document into transfer structure
MemoryStream memStream = new MemoryStream();
doc.Save(memStream, docFormat);
// ... save document in database or filesystem