show bookmark names in document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to see the name of all the bookmarks I have in a document, in the text
where they appear. I have a macro that gives me a list of all of the
bookmarks actually used in the document, but I need a macro or some way that
when I print the document, the bookmark and its name print out as well. Does
anyone know how I can get this done? I'm using Word 2002.
 
Hi =?Utf-8?B?QmV0aCBNYw==?=,
I need to see the name of all the bookmarks I have in a document, in the text
where they appear. I have a macro that gives me a list of all of the
bookmarks actually used in the document, but I need a macro or some way that
when I print the document, the bookmark and its name print out as well. Does
anyone know how I can get this done? I'm using Word 2002.
Well... you could use a macro to insert the bookmarkname's INTO the bookmarks.
That would really be pretty much the only way. You could format the names as
"hidden text". The only other thing I can think of would be to insert them as
comments, so you'd get a little line pointing to a box in the document margin.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Cindy:
Any idea on what that macro would look like? I'm kind of a newbie when it
comes to creating my own macros (I usually find ones on the 'net and copy and
paste).
 
Hi =?Utf-8?B?QmV0aCBNYw==?=,
Any idea on what that macro would look like?
Roughly, it could look something like this

Sub CreateBookmarkNames()
Dim bkm As Word.Bookmark
Dim rng As Word.Range

For Each bkm In ActiveDocument.Bookmarks
Set rng = bkm.Range
rng.Collapse
rng.Text = bkm.Name
rng.Bold = True
Next
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top