ExtractContent method do not work when bookmark in table cell

Hi,

I have documents in which below described method ExtractContent works for simple content but not for tables.

https://docs.aspose.com/words/net/how-to-extract-selected-content-between-nodes-in-a-document/

I am attaching sample document here for you reference.

Please advice.

Thanks.

MeetTest - Copy.zip (10.1 KB)

@meetp,

Thanks for your inquiry. Unfortunately, extracting the content between table’s cell is not supported at the moment. We have already logged this feature request as WORDSNET-721 (Improve table bookmarks) in our issue tracking system. We apologize for your inconvenience.

Could you please ZIP and attach your expected output document? We will then provide you more information on this.

There is no expected document.
I am using ExtractContent method from this page you have:
https://docs.aspose.com/words/net/how-to-extract-selected-content-between-nodes-in-a-document/
and using document I provided and I am expecting list of the nodes in between start bookmark and end bookmark.
Thanks,
Meet

@meetp,

Thanks for your inquiry. Please use following code example. Hope this helps you.

Document doc = new Document(MyDir + "MeetTest - Copy.docx");
Bookmark bookmark = doc.Range.Bookmarks["bm"];
ArrayList nodes = new ArrayList();
Node currentNode = bookmark.BookmarkStart;

while (currentNode != bookmark.BookmarkEnd)
{
    currentNode = currentNode.NextPreOrder(doc);
    nodes.Add(currentNode);
}

The issues you have found earlier (filed as WORDSNET-721) have been fixed in this Aspose.Words for .NET 18.9 update and this Aspose.Words for Java 18.9 update.