HTML to Word conversion issue with accessibility checker of MS Word using .NET

Hi Team,

While converting html file to word using below code, the accessibility checker of word fails to run. Then we have to convert the word file to run the accessibility checker(see attached image).

        string dataDir = @"C:\Sanjay\Test\sample_file.html";
        Aspose.Words.Document doc = new Aspose.Words.Document(dataDir);
        doc.BuiltInDocumentProperties.Title = "Test Document";
        doc.Save(@"C:\Sanjay\Test\test-copy.docx", Aspose.Words.SaveFormat.Docx);

How can we generate the word file in right format instead of in compatibility mode.

Word_CompatibiltyMode.png (8.2 KB)
Word_AccessibilityChecker.png (19.2 KB)

Regards,
Sanjay

@skothari120790

In your case, we suggest you please use CompatibilityOptions.OptimizeFor method to optimize the document to a particular versions of MS Word. You can use this method to prevent MS Word from displaying “Compatibility mode” ribbon upon document loading.

Moreover, you may also need to set the OoxmlSaveOptions.Compliance property to OoxmlCompliance.Iso29500_2008_Transitional or higher.

Please let us know if you have any more queries.