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:
http://www.aspose.com/blogs/blogs/blogs/?p=2069

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!


This message was posted using Page2Forum from Bookmarks in Aspose.Words - Aspose.Words for .NET

Hello

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

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/bookmarks-in-aspose-words.html

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

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

Best regards,