Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete all text between two bookmarks in Word

Status
Not open for further replies.

BruceG

Programmer
Dec 9, 2001
31
US
Suppose I have 2 bookmarks in an MS-Word document ("Book1" and "Book2"). Between these 2 bookmarks could be anything (from a single character to a 25-page document). What would be the code to delete everything between the 2 bookmarks? TIA for your help.
 
Never mind, I got it. What I need to do is make one "enclosing" bookmark around the range. Then I can use this code:

ActiveDocument.Bookmarks("Book1").Range.Delete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top