Is it generally safe to convert .doc to docx?

Hello, it has been a while since I upgraded, I am still using 11.6. It is used only for performing mailmerge, and that works very reliable.

All Word layouts (hundreds) are currently .doc format, and the resulting document also.
I would like to change the software to produce the resulting documents as .docx.

I know this is easy to do in code (in the save method). What I would like to know is: can I generally expect problems when saving a .doc to .docx format? Or is it as reliable as when the source document is already a docx? Does is even matter?

Apart from this: I have been looking at the detailed monthly release info, but could you point me to some highlights in new capabilities since 2013 in the area of mail merge? I am considering to upgrade.

Regards, Ed

@EdAspose

Please note that Aspose.Words mimics the behavior of MS Word. Its mean that if you save your DOC file to DOCX using MS Word and Aspose.Words, you will get the same output.

There is no issue to save your document to DOCX file format. You can perform the mail merge operation and save the document to DOCX without any issue.

In your case, we suggest you please use the OoxmlSaveOptions and CompatibilityOptions.OptimizeFor as shown below.

Document doc = new Document(MyDir + "input.doc");
OoxmlSaveOptions options = new OoxmlSaveOptions();
options.Compliance = OoxmlCompliance.Iso29500_2008_Strict;
doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2013);

doc.Save(MyDir + "output.docx", options);

Please use the latest version of Aspose.Words for .NET 19.9. If you face any issue, please let us know. We will be happy to help you.

Thank you. I purchased the latest version and it works fine.

To be 100% sure:

The code that you shown is only for when the source document is .doc format, right?
So when the source is .docx, I should not use these options when saving, I guess.

Regards, Ed

@EdAspose

You can use this code for DOCX file format not for DOC.

Please note that OoxmlSaveOptions class can be used to specify additional options when saving a document into the Docx, Docm, Dotx, Dotm or FlatOpc format.

The DocSaveOptions class can be used to specify additional options when saving a document into the DOC or DOT file formats.

image.png (28.7 KB)

Hi, I implemented your suggestion to use the Iso29500_2008_Strict compliance when a source document is from .doc format. A small downside is that the user now sees ‘Strict Open XML-document’ instead of ‘Word-document’. The latter is of course more clear for the average user.

If I do not set this compliance the result is what I would prefer.
Can it do much harm if I do not set this compliance?

Regards, Ed

@EdAspose

It is not necessary to save the DOCX with strict compliance. You can save the documnt to DOCX file format without using OoxmlSaveOptions.Compliance property.

Ok thank you, I will stop setting the compliancy then.

Regards Ed

One last question, what is the advantage of using

doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2013);

in your suggested code?

@EdAspose

You may have noticed that in your documents that MS Word displays “Compatibility mode” in the ribbon. E.g a document is created in MS Word 2010 and you open it in MS Word 2016, you will see this option.

This method allows you to optimize the document contents as well as default Aspose.Words behavior to a particular versions of MS Word.