We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to delete a bookmark

Thread ID:

Created:

Updated:

Platform:

Replies:

116338 May 16,2014 10:22 AM UTC May 21,2014 03:29 PM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: DocIO
Chris Crowhurst
Asked On May 16, 2014 10:22 AM UTC

Hi,

How do you delete a bookmark in a word document ? I have a bookmark that I wish to delete once I am finished using it, but can't seem to find out how to do this? I know how to create bookmarks and move to them just fine.

Regards

Chris

Sathish K [Syncfusion]
Replied On May 19, 2014 10:35 AM UTC

Hi Chris,

 

Thank you for your interest in Syncfusion products.

 

Kindly use the below code snippet to delete the bookmark contents.

 

BookmarksNavigator bn = new BookmarksNavigator(document);

//Moves to the bookmark

bn.MoveToBookmark("Bookmark1");

//Deleting bookmark contents

bn.DeleteBookmarkContent(false, true);

Please let us know if you have any other questions.

 

Regards,

Sathish


Chris Crowhurst
Replied On May 19, 2014 01:29 PM UTC

Hi Satish,

I don't think you understood my question. :)

I don't want to delete the bookmark content, I just wish to remove the actual bookmark itself. Similar to how you do it in word. e.g. Using the "Delete" button from the Bookmarks dialog to remove it from the list.

Regards

Chris

 


Sathish K [Syncfusion]
Replied On May 20, 2014 11:26 AM UTC

Hi Chris,

 

Thank you for your update.

 

Kindly use the below code snippet to delete a bookmark from the input Word document.

 

//Finds the bookmark by name

Bookmark bookMark = document.Bookmarks.FindByName("BookMarkName");

//Deletes the bookmark

document.Bookmarks.Remove(bookMark);

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Chris Crowhurst
Replied On May 20, 2014 04:10 PM UTC

Thanks!!!

Sathish K [Syncfusion]
Replied On May 21, 2014 03:29 PM UTC

Hi Chris,

 

Thank you for your update.

 

Please let us know if you have any other questions. We will be happy to assist you as always.

 

Please let us know if you have any other questions.

 

Regards,

Sathish


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;