Remove part of a document


#1

How to remove part of a document consists of several paragraphs and tables and specified by bookmark?

Igor S


#2

Here is the code:

// this line removes the contents of a bookmark named 'MarkedForRemoval'

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

// this line removes the bookmark itself

doc.Range.Bookmarks.Remove("MarkedForRemoval");


#3

Wow! It works!
Bolshoe spasibo.

Igor S