I am using Word 2003 and would like to view or print all the bookmarks in a
document at one time.

In brief: I use these bookmarks in the code of a audit report automation
program (written in VBA for Word) and need to eleminate a document from which
the program calls. I would like to use some of the bookmarks in another
document and eleminate others. In the past I have had to write each bookmark
out on a piece of paper. This method allows room for a lot of errors. There
has got to be an easier way! Can any one help?

Re: How can I view or print all the bookmarks in a word document at o. by Peter

Peter
Tue Dec 07 11:17:19 CST 2004

Something like this might do the trick:


Dim curdoc As Document
Dim newdoc As Document
Dim bk As Bookmark
=20
Set curdoc =3D ActiveDocument
=20
Set newdoc =3D Application.Documents.Add
=20
For Each bk In curdoc.Bookmarks
Call newdoc.Range.InsertAfter(bk.Name & vbNewLine)
Next bk
=20
hth,

-Peter

"Cowgirl Up" <Cowgirl Up@discussions.microsoft.com> wrote in message =
news:876BDE13-ED0A-4B74-AC27-BAB2858DA7CD@microsoft.com...
> I am using Word 2003 and would like to view or print all the bookmarks =
in a=20
> document at one time. =20
>=20
> In brief: I use these bookmarks in the code of a audit report =
automation=20
> program (written in VBA for Word) and need to eleminate a document =
from which=20
> the program calls. I would like to use some of the bookmarks in =
another=20
> document and eleminate others. In the past I have had to write each =
bookmark=20
> out on a piece of paper. This method allows room for a lot of errors. =
There=20
> has got to be an easier way! Can any one help?

Re: How can I view or print all the bookmarks in a word document at o. by macropod

macropod
Tue Dec 07 21:58:25 CST 2004

Hi Cowgirl,

The following macro generates a list of all bookmarks at the end of the
active document and displays their contents:



Sub ListBkMrks()
Dim oBkMrk As Bookmark, oBMk As Variant
If ActiveDocument.Bookmarks.Count > 0 Then
For Each oBkMrk In ActiveDocument.Bookmarks
With Selection
.EndKey Unit:=wdStory
.InsertAfter vbCrLf
.InsertAfter oBkMrk.Name & " "
.EndKey Unit:=wdStory
oBMk =
ActiveDocument.Fields.Add(Range:=Selection.Range, Text:= oBkMrk.Name,
PreserveFormatting:=False)
End With
Next oBkMrk
End If
End Sub

Cheers

"Cowgirl Up" <Cowgirl Up@discussions.microsoft.com> wrote in message
news:876BDE13-ED0A-4B74-AC27-BAB2858DA7CD@microsoft.com...
> I am using Word 2003 and would like to view or print all the bookmarks in
a
> document at one time.
>
> In brief: I use these bookmarks in the code of a audit report automation
> program (written in VBA for Word) and need to eleminate a document from
which
> the program calls. I would like to use some of the bookmarks in another
> document and eleminate others. In the past I have had to write each
bookmark
> out on a piece of paper. This method allows room for a lot of errors.
There
> has got to be an easier way! Can any one help?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/2004



Re: How can I view or print all the bookmarks in a word document at o. by Charles

Charles
Wed Dec 08 14:16:39 CST 2004

Here is a post by Ty Anderson on how to do this:

http://blogs.officezealot.com/ty/archive/2004/11/12.aspx

--

Charles
www.officezealot.com



"Cowgirl Up" <Cowgirl Up@discussions.microsoft.com> wrote in message
news:876BDE13-ED0A-4B74-AC27-BAB2858DA7CD@microsoft.com...
>I am using Word 2003 and would like to view or print all the bookmarks in a
> document at one time.
>
> In brief: I use these bookmarks in the code of a audit report automation
> program (written in VBA for Word) and need to eleminate a document from
> which
> the program calls. I would like to use some of the bookmarks in another
> document and eleminate others. In the past I have had to write each
> bookmark
> out on a piece of paper. This method allows room for a lot of errors.
> There
> has got to be an easier way! Can any one help?