Hi,
While keeping the track changes ON in a word document
If I parse the following List after adding a new element in a list
Level 1
1.1) Level 1.1
Text at level 1.
1.2) New Added Level
Text at new added level
1.3) Level 1.2
2) Level 2
(“New Added level” being the new inserted text)
For both “New Added Level” and “Text at new added level” if the text was inserted in Ms Word 2007 its gives list level as 1
and for the same in Ms Word 2003 it gives “New Added Level” at list level 1 and “Text at new added level” at list level 0
Why is this behaving so in Ms Word 2007 and what should be done to resolve this problem
Thanks in advance
Thanks for your inquiry. Could you please attach your documents and code here for testing? I will check the issue and provide you more information.
Best regards.
Thank you for additional information. I have tried to save MS2003.doc using MS Words 2007 and after running your code I got the same result (as with original document). So I cannot see the problem here.
Best regards,
Hi,
Thanks for your prompt reply. But the problem persists at my end.
Please find another attached document Test1.doc , this document is created in Ms Word 2003 and the track changes were kept on. After editing it in 2007 I get the same result.
Hi
Thank you for additional information. Some of your paragraphs are not list items, that is why you see ListLevel = 0.
Please try using the following code:
Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
As a workaround you can try calling acceptAllRevisions method before retrieving ListNumber.
Best regards,
Hi,
Thanks for the information. As of now i am working with the workaround. Can you provide me with the issue number of the same so i can keep a follow up with the same.
Warm Regards,
Hi
Thanks for your request. Unfortunately, at the moment I cannot provide you any additional information regarding this issue. I added your request into my monthly report, this will push the issue up in the priority list. We will let you know once the issue is resolved.
Best regards,
I think the correct output before accepting changes is:
0
1
2
2
2
2
Then the correct output after accepting changes is:
0
1
2
0
1
2
Was this what you were getting before or not?
We fixed some other issues in revisions in AW and I think this addressed the problem so it outputs the results as show above. I think it is correct and I am closing this issue. It will be released end of May.
Hi Tarul,
Thank you for additional information. But still I do not see any problems. To make sure that Aspose.Words returns correct values I created the same test code using MS Word Automation.
Here is my Java code for testing:
As you can see the only difference between MS Word Automation and Aspose.Words outputs is that Aspose.Words uses zero-based list level numbers.
Best regards.
Attached is the code and document.
I just want to highlight that I do not want to accept the revisions of the document. I expect the output same every time (before or after accepting revisions). Again just to stress this works as expected in documents created in MS Word 2003 (without accepting revisions) and fails for higher version of MS Word. For your reference following is the expected output:
Before Accepting Changes:
Paragraph : Section 1
level : 0
Paragraph : Cl 1
level : 1
Paragraph : Section 2
level : 0
Paragraph : Cl 2
level : 1
Paragraph : Cl3
level : 1
Paragraph : Section new
level : 0
Paragraph : Cl new
level : 1
Paragraph : Section 3
level : 0
Paragraph : Cl 4_level : 1
===================
After Accepting Changes:
Paragraph : Section 1
level : 0
Paragraph : Cl 1
level : 1
Paragraph : Section 2
level : 0
Paragraph : Cl 2
level : 1
Paragraph : Cl3
level : 1
Paragraph : Section new
level : 0
Paragraph : Cl new
level : 1
Paragraph : Section 3
level : 0
Paragraph : Cl 4_level : 1
Hi Tarul,
Thank you for additional information. What I try to explain is that Aspose.Words does not calculate these values. Aspose.Words just returns the values stored in the document. So I am still sure that here is no problem in Aspose.Words.
Best regards,