We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converting .doc to .docx while preserving document properties

I’m trying to convert a .doc document to .docx (2013 and higher compatibility) and I also want to maintain any document properties already exists in pre-2007 docs.


Document doc = new Document(fpath);
doc.getCompatibilityOptions().optimizeFor(MsWordVersion.WORD_2013);
OoxmlSaveOptions options = new OoxmlSaveOptions(SaveFormat.DOCX);
options.setCompliance(OoxmlCompliance.ISO_29500_2008_STRICT);
doc.save(fileName, options);

The above code doesn’t preserve any custom properties added to .doc document. Is there any way to maintain the old custom properties? I may be doing something wrong here…

Thanks,
Mahesh
Hi Mahesh,

Thanks for your inquiry. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

Here you go. Thank you.


I have 2 custom properties in the .doc (CustomTitle, CustomEffectiveDate)
Hi Mahesh,

Thanks for sharing the documents. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15082. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-15082) have been fixed in this Aspose.Words for .NET 17.4 update and this Aspose.Words for Java 17.4 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.