We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Remove row at bookmark (ASP Classic)

I move to a bookmark using:

builder.movetobookmark("myBookmark")

How do I delete (completely remove from the doc) the entire row in which that bookmark is located?

I have NOT been successful trying to use GetCurrentNode.

Hi Bill,

Thanks for your inquiry. Please use the following code example to remove the table’s row which contains the bookmark. Hope this helps you.

Dim helper
Set helper = CreateObject("Aspose.Words.ComHelper")
Dim builder
Set builder = CreateObject("Aspose.Words.Documentbuilder")
Dim doc
Set doc = helper.Open("c:\in.docx")
doc.Range.Bookmarks.Item(0).BookmarkStart.ParentNode.ParentNode.ParentNode.Remove
doc.Save ("c:\out.docx")