We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7c2996 commit 1f57930Copy full SHA for 1f57930
Word-document/Continue-numbering-different-styles/Continue-numbering-different-styles/Program.cs
@@ -16,8 +16,10 @@
16
// Initialize a variable to hold the list style from the destination document.
17
ListStyle listStyle = null;
18
// Iterate through the paragraphs in the last section of the destination document.
19
- foreach (WParagraph paragraph in destinationDocument.LastSection.Paragraphs)
+ int countOfParagraph = destinationDocument.LastSection.Paragraphs.Count;
20
+ for (int i = countOfParagraph-1;i>=0;i--)
21
{
22
+ WParagraph paragraph = destinationDocument.LastSection.Paragraphs[i];
23
if (paragraph.ListFormat.CurrentListStyle != null)
24
25
// Get the current list style.
0 commit comments