PC Review


Reply
Thread Tools Rate Thread

Can I print a list of bookmarks in a document or template?

 
 
WordQueen
Guest
Posts: n/a
 
      10th Feb 2009
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?
 
Reply With Quote
 
 
 
 
Graham Mayor
Guest
Posts: n/a
 
      11th Feb 2009
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

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


WordQueen wrote:
> 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?



 
Reply With Quote
 
macropod
Guest
Posts: n/a
 
      11th Feb 2009
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" <(E-Mail Removed)> wrote in message news:203C9364-3D27-407D-AFB1-(E-Mail Removed)...
>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?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print document list TKOFaith Windows XP General 4 16th Jul 2008 02:30 AM
How to print bookmarks in a document =?Utf-8?B?UGF1bCBCYWtrZXI=?= Microsoft Word Document Management 2 6th Sep 2007 01:24 PM
Please Help?! Pass list box contents to Bookmarks in Word Document =?Utf-8?B?QS4gU21hcnQ=?= Microsoft Access Form Coding 0 2nd Feb 2006 05:00 PM
How do I set a Word template to print to a specific document tray. =?Utf-8?B?TmF0aGFu?= Microsoft Word Document Management 4 13th Aug 2005 04:48 PM
Print My Document List Patrick Murphy Microsoft Word New Users 1 17th Sep 2003 03:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:32 AM.