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

Free Support Forum - aspose.com

Error while converting .doc to .docx in styles

I am using word 2007. I have a style “Caption” which is not in “In current document” option, but is a part of “All styles” option of the “Style Pane Options”. Now after I convert this “.doc” document to “.docx” document using Aspose.Words by the function mentioned below, I get the caption style as part of the “In current document”. Why is this style appearing in the “In current document” option after converting while it is not appearing before conversion?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am using Aspose.Words version 5.2.0.0 and I have a license for it.

CODE:

public static void ConvertDocToDocx(string strDocInputLocation,string strDocxOutputLocation)

{

try

{

Document aspoDoc = new Document(strDocInputLocation);

aspoDoc.Save(strDocxOutputLocation, SaveFormat.Docx);

}

catch (Exception exception)

{

throw new ApplicationException("Failed to convert Word 2003 format to Word 2007.",exception);

}

}

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Would you please attach your document for testing? I will check it and provide you more information.

Best regards.

Hi,

The file attached (2003.doc) has no such style as "Caption" in the "In current Document" option of the style pane "(Alt+Ctrl+Shift+S) --> Options --> In current document", but after using Aspose.words to convert it to 2007 version (2007.docx), I find it appearing in the "In current Document" option of the resulting document.

Thanks.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I managed to reproduce this problem on my side. I created new issue #5529 in our defect database. We will notify you as soon as it is fixed.

Best regards.

Hi,

Thank you for the heads up and the help is appreciated.

We are using Aspose in our QA environment and we are getting stuck to a high QA ticket because of this issue.It would be of great help if you could provide the ETA for the resolution for this problem so that we can communicate this to our QA team.

Thank you

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Currently I can’t provide you any reliable estimate. Please expect a reply before next hotfix (within 2-3 weeks).

Best regards.

Have you got any feedback on this issue?

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately this issue is still unresolved. I will consult with our developers and provide you more information.

Best regards.

I am going to work on this issue, but I am curious to know how comes style pane filter is a showstopper for you. What is your use case that requires the style pane filter to be correctly preserved? I thought this is not a very important feature in Word documents.

Hi,

I can answer your question. We have a system when a template file is uploaded to a sharepoint system, it goes to each of the content file in the system and replaces the styles of the content file with template styles. User is uploading a template file without a caption style. But when they open a content file, they see this style in all the files. They are compalining and afraid to use the system as some of extra styles are getting appended. If any of these not supported ( ex: Caption) style is used by mistake, our publishing is going to be wrong.

Being said that, we have lot of dependency on what styles we display and use it.

Venki

The issues you have found earlier (filed as 5529) have been fixed in this update. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The issue is resolved while converting from ".doc" to ".docx" in the version 5.2.2.0 of aspose.word. But now while converting back from ".docx" to ".doc", we face the same issue.

We are converting 2003 format document to 2007 format document to carry out some manipulations on the document by using OOXML (Open Office XML). Since there is an issue while converting from ".docx" back to ".doc" we facing a lot of problems.

We need the styles that are in the remommended list of the document to retain the same list while any sort of conversion. Currently you have fixed only the issue while converting from ".doc" to ".docx". But the recommended style list still has styles which not in ".docx" but comes in ".doc" while converting from ".docx" to ".doc".

Please look into this issue which is stopping our work.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I managed to reproduce this problem and create another issue in our defect database (#6229). I will notify you as soon as it is fixed.

Best regards.

Hi,

Could you please let me know the ETA on this as this is holding up many other issues in our test environment?

Thanks for the help,
Ashish

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Please expect a reply before next hotfix (within 3-4 weeks).

Best regards.

Any update on this? It's been more than 3 months we have been waiting. Please let us know when will you be fixing this issue?

Venki

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. The issue #6229 is still unresolved. I will consult with our developers and provide you more information.

Best regards.