We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

word document's comment missing numbered list

Hi Syncfusion,


I want to extract the comments from word but the numbered list is missing in result. Please review to the screenshot and code below. I had attached the document.


Code:

using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx))

                {

                    foreach (WComment comment in document.Comments)

                    {

                        if (comment.ChildEntities.Count > 1)

                        {

                            string[] str = new string[comment.ChildEntities.Count];

                            for (int y = 0; y < comment.ChildEntities.Count; y++)

                            {

                                str[y] = ((Syncfusion.DocIO.DLS.WParagraph)comment.ChildEntities[y]).Text;

                            }

                            Console.WriteLine($"Comment : {String.Join("\n", str)}");

                        }

                        else

                        {

                            string commentBody = ((Syncfusion.DocIO.DLS.WParagraph)comment.ChildEntities.FirstItem).Text;

                            Console.WriteLine($"Comment : {commentBody}");

                        }

            }

}

Regards


Attachment: Lorem_(2)_7a5addfb.zip

8 Replies

SB Suriya Balamurugan Syncfusion Team March 9, 2023 05:45 PM UTC

Hi Jinchuan,

We have reproduced the reported problem with “List numbers not extracted from comments in the Word document” in our end, and we suspect it to be a defect. We will validate this issue and update you with more details on 13th March 2023.

Regards,
Suriya Balamurugan.



AA Akash Arul Syncfusion Team March 13, 2023 02:25 PM UTC

Jinchuan, we have confirmed that the reported issue List numbers in comments are not extracted in a DOCX format document” is a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release which is estimated to be available on 28th March 2023.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/42016/list-numbers-in-comments-are-not-extracted-in-a-docx-format-document

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”




AN Anto Nihil Sahaya Raj Syncfusion Team March 28, 2023 03:42 PM UTC

Jinchuan, we have included the fix for this issue in this weekly NuGet release, which will be available on tomorrow (29th March 2023). We will let you know once it is rolled out.

The status of the bug can be tracked through below feedback link.
https://www.syncfusion.com/feedback/42016/list-numbers-in-comments-are-not-extracted-in-a-docx-format-document



AN Anto Nihil Sahaya Raj Syncfusion Team March 29, 2023 03:18 PM UTC

Jinchuan, as promised earlier, we have included the fix for the reported issue with “List numbers in comments are not extracted in a DOCX format document” in our latest weekly NuGet release (v21.1.37).

Please use the below link to download our latest weekly NuGet:
https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core/21.1.37

The status of this bug task can be tracked through the below link:
https://www.syncfusion.com/feedback/42016/list-numbers-in-comments-are-not-extracted-in-a-docx-format-document

Note: We will include this fix in our 2023 Volume 1 Service Pack Release which will be available in start of May 2023.



JD Jinchuan DU March 31, 2023 01:17 AM UTC

Hi Anto,


I updated to v21.1.37 but it is not working. You can download the previous document to test.


Regards




AN Anto Nihil Sahaya Raj Syncfusion Team March 31, 2023 04:17 PM UTC

Jinchuan, we have found that you are expecting the list value from the Text API of the paragraph in your code snippet. But we have maintained the list value in a ListString API of the paragraph.

To achieve your requirement, we suggest you to get the list value using ListString API of the comment paragraph.

We have prepared the sample application to extract the comments along with its list number, and it can be downloaded from the below link,
https://www.syncfusion.com/downloads/support/directtrac/general/ze/List-numbers412617324.zip

Note: Please find the input Word document in the “Data” folder of the attached sample application.

In this attached sample, we have done the following things.
1. Opens the template Word document.
2. Invoke the GetText() method to get the actual list value from this ListString API.
2. Get the list value using ListString API of comment paragraph and print in a console window.
3. Saves the Word document.

Please find the output in the console window,



Please refer to the below UG documentation link to know more about how to get list value in the Word document,
https://help.syncfusion.com/file-formats/docio/working-with-paragraph#get-list-value

Note: Before v21.1.37 release, our ListString API doesn’t work properly for your requirement. For that, we have included the fix in the release (v21.1.37). But we have missed to convey about this ListString API and modified code snippet to you while updating the fix details in our previous update.




JD Jinchuan DU April 3, 2023 01:54 AM UTC

Hi Anto,


It works now. Thanks.


Regards



JS Jayashree Suresh Anand Syncfusion Team April 3, 2023 10:05 AM UTC

 You're welcome, please get back to us if you need any other assistance. 


 



Loader.
Live Chat Icon For mobile
Up arrow icon