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

Free Support Forum - aspose.com

How to remove a bookmark content- without removing the bookmark itself

Hi, I’ve found this article about to remove a bookmark content:

I need to develop a similar function, but I want to remove only the content of a specified bookmark and keep the bookmark itself.
How can the method be modified to remove only the content and not the bookmark itself?
Thank you!


Thanks for your request. Please see the following link to learn how to work with bookmarks using Aspose.Words:

To remove content of bookmark you should use code like the following:

doc.Range.Bookmarks["mybk"].Text = "";

Best regards,