PDA

View Full Version : How to edit word bookmark titles in excel



ntc681
02-11-2014, 10:06 AM
All,

I have an existing spreadsheet w/ code for a manual that imports all bookmarks from a word document, allows me to select the correct ones, and then essentially deletes all other bookmarks in word when creating the manual.

What I am looking for is the ability to rename my imported bookmark titles in excel and then update same word document.

My excel is updated with 3 columns, a "yes/no" column, a short string of text, and the bookmark title. So it makes it very easy to edit.

I really just want to update the bookmark title in excel and then run a macro to update the actual word bookmark titles since doing so in MS Word is very cumbersome.

Thanks ALL --- First time poster here!

Neil.

macropod
02-11-2014, 03:26 PM
You can't rename a bookmark in Word. What you can do, however, is to apply a new bookmark name to the same range as the old bookmark name, then delete the old bookmark name. For example:

With ActiveDocument
.Bookmarks.Add Name:="new", Range:=.Bookmarks("old").Range
.Bookmarks("old").Delete
End With