Word to HTML Conversion Produces Wrong Bullet Labels (aa., bb., cc. → aa., ab., ac.)

Hi Aspose Team,

We are using the Aspose.Words Word to HTML conversion API, and during one of the document conversions we encountered an incorrect bullet sequence in the HTML output.

I have uploaded images showing:

  • The original bullet list in the .docx file
  • The incorrect bullet list in the generated HTML

The alphabetic multi-letter bullets (e.g., aa., bb., cc., dd.) are being converted into aa., ab., ac., ad. in the HTML output, which is incorrect.

Could you please help us fix this issue so that the bullet labels are preserved correctly? Thank you.

Best Regards,
Rohan Bade

converted_html_file


docx_file

@RohanBade759

The list labels that Aspose.Words writes to HTML are controlled by HtmlSaveOptions.ExportListLabels.
When the option is left at its default value Auto, the exporter may switch between <ol>/<li> tags and inline <p> markup, which can lead to the wrong alphabetic sequence you are seeing (e.g. aa., ab., ac.) 【3】.

Fix / workaround

// Load the document
Document doc = new Document(@"input.docx");

// Configure HTML save options
HtmlSaveOptions htmlOpts = new HtmlSaveOptions
{
    // Force the exporter to use HTML list tags (or inline text)
    ExportListLabels = ExportListLabels.ByHtmlTags   // or ExportListLabels.AsInlineText
};

doc.Save(@"output.html", htmlOpts);
  • ExportListLabels.ByHtmlTags forces the use of <ol type="a"> / <li> for all list levels, preserving the original multi‑letter alphabetic bullets.
  • ExportListLabels.AsInlineText writes the label as plain text inside a <p> element, which also keeps the exact label content.

Bug report

The conversion you observed (aa., bb., cc. → aa., ab., ac.) is not the expected behavior of the Auto mode. We will log this issue for further investigation 【0】. In the meantime, setting ExportListLabels as shown above should give you the correct output.

@RohanBade759 Could you please attach your input DOCX document here for testing? We will check the issue and provide you more information.

Hello @alexey.noskov.

Here is the docx file. Unfortunately, I am unable to upload the html because this reply only expects png,docx, and other file formats but doesn’t allow the html.

UFG document - CP 70 91 06 26.docx (135.8 KB)

Best Regards,
Rohan Bade

@RohanBade759 Thank you for additional information. The problem can be reproduced with the following simplified document: in.docx (31.6 KB)
Here is the produced output: out.zip (1.0 KB)

You can resolve the problem by specifying ExportListLabels.AsInlineText:

Document doc = new Document(@"C:\Temp\in.docx");

HtmlSaveOptions opt = new HtmlSaveOptions();
opt.ExportListLabels = ExportListLabels.AsInlineText;

doc.Save(@"C:\Temp\out.html", opt);

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-28937

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.