Incorrect word count when the document has a custom list number format

Dear all,

While trying to get the word count from a document, Aspose Words returns a value different from the one displayed on Microsoft Word.

It appears that Aspose is counting all the words in the list number format as a single word.

Here is an example:

  1. I created a new document and added a numeric list using the option below.

  1. Then, I customized it by changing the number format:

  1. This is the final document (you can find it attached):

  1. Word shows 11 words:

  1. Aspose Words shows 5 words:

We are using Aspose.Words 25.4.0 with .NET 8. You can find below the code and document used to get the word count.

using Aspose.Words;

var license = new License();

license.SetLicense("Aspose.Total.NET.lic");

var doc = new Document(File.OpenRead(@"Sample.docx"));

doc.UpdateWordCount();
doc.UpdatePageLayout();

Console.WriteLine($"Word Count is {doc.BuiltInDocumentProperties.Words}");

Sample.docx (14.2 KB)

Best regards,

Fabiano França

@fabianoatunorg
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-28189

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.

Dear @alexey.noskov, thank you for quick answer. Will this post be updated when this issue is fixed, or should I keep checking the release notes for it?

@fabianoatunorg We will be sure to notify you here in this topic once the issue is resolved or we have more information for you.

1 Like