Is there a way, using VBA in Word 2007, to generate a list, in another Word
document, of all of the bookmarks in a document?
Yes, it's quite simple:
Sub x()
Dim doc1 As Document, doc2 As Document
Dim bk As Bookmark
Set doc1 = ActiveDocument
If doc1.Bookmarks.Count = 0 Then
MsgBox "This document contains no bookmarks."
Exit Sub
End If
Set doc2 = Documents.Add
For Each bk In doc1.Bookmarks
doc2.Range.InsertAfter bk.Name & vbCr
Next
End Sub
If you want the list sorted in the order of the locations of the bookmarks
rather than alphabetically by name, change the For Each line to
For Each bk In doc1.Range.Bookmarks