- Code: Select all
Spire.Doc.Document MainDocObj = new Spire.Doc.Document();
MainDocObj.LoadFromFile(FName.ToString(), Spire.Doc.FileFormat.Doc);
MainDocObj.ViewSetup.DocumentViewType = Spire.Doc.DocumentViewType.PrintLayout;
MainDocObj.SaveToFile(TName.ToString() + ".doc", Spire.Doc.FileFormat.Doc);
MainDocObj.Close();
MainDocObj.Dispose();
The Original.doc I can open in any version of Word. The AfterSpire.doc I cannot open at all, 2003 lets me open it but I still get a security warning, 2013/2016 don't let me open it at all. Any idea why this might be happening?