Murray Brown
asked on
View all Word Bookmarks on page
Hi
Is there a way to view all the Word Bookmark names at their respective locations at once?
Thanks
Is there a way to view all the Word Bookmark names at their respective locations at once?
Thanks
Unfortunately, Word does not provide an automatic method of printing bookmarks, as it does with other document-related information. The quickest way to print a bookmark list is to just insert the list in your document and then print it. The following VBA macro inserts the bookmark list at the insertion point:
Sub BkMarkList()
Dim J as Integer
Selection.TypeParagraph
Selection.InsertBreak Type:=wdColumnBreak
Selection.TypeText Text:="Bookmark list for "
Selection.TypeText Text:=ActiveDocument.Name
Selection.TypeParagraph
For J = 1 To ActiveDocument.Bookmarks.C ount
Selection.TypeText Text:=Chr(9)
Selection.TypeText Text:=ActiveDocument.Bookm arks(J).Na me
Selection.TypeParagraph
Next J
Selection.InsertBreak Type:=wdColumnBreak
End Sub
When you run the macro, a heading indicating the name of the file will be inserted, followed by each bookmark in the file. These will be in alphabetic order. The bookmark list has a column break before it and after it, as well.
source: http://word.tips.net/T001019_Printing_a_Bookmark_List.html
Sub BkMarkList()
Dim J as Integer
Selection.TypeParagraph
Selection.InsertBreak Type:=wdColumnBreak
Selection.TypeText Text:="Bookmark list for "
Selection.TypeText Text:=ActiveDocument.Name
Selection.TypeParagraph
For J = 1 To ActiveDocument.Bookmarks.C
Selection.TypeText Text:=Chr(9)
Selection.TypeText Text:=ActiveDocument.Bookm
Selection.TypeParagraph
Next J
Selection.InsertBreak Type:=wdColumnBreak
End Sub
When you run the macro, a heading indicating the name of the file will be inserted, followed by each bookmark in the file. These will be in alphabetic order. The bookmark list has a column break before it and after it, as well.
source: http://word.tips.net/T001019_Printing_a_Bookmark_List.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much
There is no built-in method for displaying bookmark names in the document.