Hi tpayne
The code below isn't thoroughly tested, but it should do the job. It
creates a new blank document and lists there all the bookmark names in
your currently-open document.
If you're not sure what to do with the macro, see
http://www.gmayor.dsl.pipex.com/installing_macro.htm and
http://www.mvps.org/word/FAQs/MacrosVBA/CreateAMacro.htm
Hope this helps.
Shauna
Option Explicit
Sub ListAllBookmarksInThisFile()
'Shauna Kelly, 13 November 2003
'for microsoft.public.word.docmanagement
'
'List all the bookmark names in the active
'document in a new blank document
Dim oThisDoc As Document
Dim oNewDoc As Document
Dim oBM As Bookmark
Set oThisDoc = ActiveDocument
Set oNewDoc = Documents.Add
oNewDoc.Range.InsertAfter _
"Bookmarks stored in " & oThisDoc.FullName & vbCrLf
For Each oBM In oThisDoc.Bookmarks
oNewDoc.Range.InsertAfter oBM.Name & vbCrLf
Next oBM
End Sub
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
tpayne said:
I need to print, or export to a document, a list of all the bookmark
names in a long document. Does anyone know how to do that? Maybe someone
has written a macro to do this. It seems like a very useful thing to be
able to do. Thanks.