Sets a list of bookmarks to be removed from the document.

 public void BookmarksToRemove(string [] bookmarks)
Public Sub BookmarksToRemove(bookmarks as string())

An array of strings containing the names of all the bookmarks to be removed

BookmarksToRemove will throw this exception if a bookmark in the list has been set as a Repeat Block

BookmarksToRemove will throw this exception if bookmarks is null.

This feature is available in OOXML files (DOCX/DOCM) only.

Removing a bookmark will remove anything that is inside that bookmark.


WordTemplate wt = new WordTemplate();
wt.Open(@"c:\templates\Template.docx");
string [] bookmarks = {"Bookmark1", "AroundTable"};
wt.BookmarksToRemove(bookmarks);
wt.Process();
wt.Save(@"c:\reports\Report.docx");
Dim wt As New WordTemplate()
wt.Open("c:\templates\Template.docx")
Dim bookmarks = New String() {"Bookmark1", "AroundTable"};
wt.BookmarksToRemove(bookmarks);
wt.Process()
wt.Save("c:\reports\Report.docx")