Hello,
i have a document containing various bookmarks.
I need to move to a specific bookmark and applay numbered list format to all paragraphs within the bookmark.
How can i obtain this?
I’m using Aspose.Words .NET…tried the following code:
Dim bm As Bookmark = document_.Range.Bookmarks(bookmark_)
If Not bm Is Nothing Then
Dim currentNode As Node = bm.BookmarkStart
While (Not currentNode Is Nothing AndAlso Not currentNode.Equals(bm.BookmarkEnd))
If currentNode.NodeType = NodeType.Run Then
DirectCast(currentNode, Run).ParentParagraph.ListFormat.ApplyNumberDefault()
End If
currentNode = currentNode.NextSibling
End While
Else
bLg.Error("bookmark " & bookmark_ & "not found")
End If
But this way only the first paragraph is numbered.
Can you help?
Thanks in advance.
Test.zip (7.8 KB)