View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Can I print a list of bookmarks in a document or template?

Hi WordQueen,

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


--
Cheers
macropod
[MVP - Microsoft Word]


"WordQueen" wrote in message ...
I need to print a list of bookmark names in a template. I can't figure out
how to do so. Any words of wisdom?