You could do it with a macro. The following will list all the bookmarks in a
new document.
Dim aDoc As Document
Dim bDoc As Document
Set aDoc = ActiveDocument
Set bDoc = Documents.Add
For i = 1 To aDoc.Bookmarks.Count
sBn = aDoc.Bookmarks(i).name
bDoc.Range.InsertAfter sBn & vbCr
Next i
bDoc.Activate
The following macro generates a list of all bookmarks at the end of the active document, together with their contents:
Sub ListBkMrks()
Dim oBkMrk As Bookmark
If ActiveDocument.Bookmarks.Count > 0 Then
With Selection
.EndKey Unit:=wdStory
.TypeText Text:=vbCrLf & "Bookmark" & vbTab & "Contents"
For Each oBkMrk In ActiveDocument.Bookmarks
.TypeText Text:=vbCrLf & oBkMrk.Name & vbTab & oBkMrk.Range.Text
Next oBkMrk
End With
End If
End Sub
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.