Hi,
we are using Aspose.Words.Net 14.5.0. to modify a document. If we do nothing but save it it gets corrupted and MSWord won’t open it. We have found that there is no problem with a newly creaed word document, but that the problem occurs with a specific doc containing content controls, custom xml etc.
This is all we do (test files attached):
private static string SaveFile(string filename)
{
License l = new License();
var assembly = Assembly.GetExecutingAssembly();
string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
Stream s = assembly.GetManifestResourceStream("WordXMLTest.Aspose.Words.lic");
l.SetLicense(s);
Document doc = new Document(filename);
string newFilename = filename.Replace(".docx", "_ny.docx");
doc.Save(newFilename);
return newFilename;
}
Best regards,
Sigge