Table of Contents

Method RemoveBookmark

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

RemoveBookmark(WordDocument, DocumentPosition, string)

Insert > Bookmark, Delete, as one undoable edit: the bookmark goes, the text it marked stays.

public static DocumentEdit RemoveBookmark(this WordDocument document, DocumentPosition at, string name)

Parameters

document WordDocument

The document.

at DocumentPosition

Where the caret is: the edit's Before and After.

name string

The name, compared ignoring case.

Returns

DocumentEdit

The edit.

Exceptions

ArgumentNullException

document or name is null.

ArgumentException

The position is not in the document, or no bookmark has the name.