Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jul 29, 2022 10:50 pm

Hi Team,

I use a licensed version of Spire.Doc. The word document generated by Spire doc is Word97. The document generated opens in compatibility mode since the generated document is an older version, is there a way to generate latest versions of the word document through Spire Doc?

Below is the code to generate document

Code: Select all
Spire.Doc.Document document = new Spire.Doc.Document();
Console.WriteLine($"Document version is {document.Properties.Version}");
FileFormat fileFormat = FileFormat.Docx;
var memoryStream = new MemoryStream();
document.TrackChanges = true;
document.SaveToStream(memoryStream, fileFormat);
memoryStream.Seek(0, SeekOrigin.Begin);
return memoryStream;


document.Properties.Version is a readony (get) property so I can't set the version, is there a way to set the version?

Also, the latest version defined on DocumenVersion enum is Word2007 that is Document created using Word 2007, but as per documentation (https://www.e-iceblue.com/Introduce/word-for-net-introduce.html#.YuRiyDfMK4Q) Spire.Doc supports Word 97-2003 /2007/2010/2013/2016/2019, so why does enum only has versions defined till word2007?

Appreciate your input.

Thank You,
Jalpa Ashara

jalpaashara
 
Posts: 21
Joined: Wed Jun 22, 2022 8:12 pm

Mon Aug 01, 2022 8:49 am

Hi,

Thank you for your inquiry.
Kindly note the new Spire.Doc.Document() will create Word97 version by default. You can refer to the code below to specify the higher version when saving the document.
Code: Select all
 document.SaveToStream(memoryStream, FileFormat.Docx2013);

Our Spire.Doc supports loading the files with Word 97-2003 /2007/2010/2013/2016/2019 versions. But at present the highest version supported in FileFormat enum type is FileFormat.Docx2013.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Mon Aug 01, 2022 5:47 pm

Thanks for the response. I tried with FileFormat.Docx2013 and now the document doesn't open in compatibility mode which is good. Is there a roadmap to support versions greater than Docx2013 in near future?

Thank You!

jalpaashara
 
Posts: 21
Joined: Wed Jun 22, 2022 8:12 pm

Tue Aug 02, 2022 8:25 am

Hi,

Thanks for your feedback.
We will consider adding the higher version than Docx2013 in FileFormat enum type. If it is achieved in the future, I will inform you.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Mon Apr 10, 2023 6:28 am

Hi jalpaashara,

Thanks for your patience.
We just released Spire.Doc.11.4.0 hotfix, which supports Docx2016 and Docx2019 file formats. please download from the following links and have a test.
Website link: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Doc/11.4.0

Sincerely,
Ella
E-iceblue support team
User avatar

Ella.Zhang
 
Posts: 42
Joined: Fri Apr 07, 2023 7:42 am

Mon Apr 10, 2023 6:10 pm

Hi Team,

Thank you for the update. I just want to make sure, if I update the FileFormat to Docx2019, will it continue to work for all versions of Word from the past. For example, if I have Word 2013 or lower installed on my system, the generated Docx2019 document will not have any compatibility issues.

jalpaashara
 
Posts: 21
Joined: Wed Jun 22, 2022 8:12 pm

Tue Apr 11, 2023 6:58 am

Hi ,

Yes,it continue to work for all versions of Word from the past and there are currently no compatibility issues.

If you have any further questions, please feel free to contact us. We'd be happy to help you.

Sincerely,
Ella
E-iceblue support team
User avatar

Ella.Zhang
 
Posts: 42
Joined: Fri Apr 07, 2023 7:42 am

Return to Spire.Doc