#1   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 5
Default bookmarks

I am using Word 2000 & I seem to have 1000's of hidden bookmarks. How can I
get rid of them, besides using the bookmark dialog box which deletes them
one by one? I do have about 60 that I would like to keep if possible, but
would sacrifice them if need be to get rid of the 1000's.

--
Later,

-- Richard --


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default bookmarks

Hi Richard,

Getting rid of them is easy enough with a macro, but be careful - Word may
actually be using them. For example, if your document has cross-references
to headings, you'll likely have bookmarks prefixed with '_Ref'. Delete those
and your cross-references are history. To see what all these bookmarks are
and what they refer to, run the following code. It will produce a listing at
the end of the document:

Sub ListBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
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

After you've run this, you can see which ones might not be needed.

You can probably safely kill off any empty bookmarks, for which you can use
the following code:

Sub KillEmptyBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
If ActiveDocument.Bookmarks.Count 0 Then
For Each oBkMrk In ActiveDocument.Bookmarks
If ActiveDocument.Bookmarks(oBkMrk).Empty = True Then oBkMrk.Delete
Next oBkMrk
End If
End Sub

If you then re-run the 'ListBkMrks' macro, the listing may be significantly
shorter. Any other unwanted bookmarks are best deleted manually.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
I am using Word 2000 & I seem to have 1000's of hidden bookmarks. How can

I
get rid of them, besides using the bookmark dialog box which deletes them
one by one? I do have about 60 that I would like to keep if possible, but
would sacrifice them if need be to get rid of the 1000's.

--
Later,

-- Richard --




  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 5
Default bookmarks

Your macro's were a great help!

What about duplicate bk marks? How can I delete those?

Thanks,

Richard

"macropod" wrote in message
...
Hi Richard,

Getting rid of them is easy enough with a macro, but be careful - Word may
actually be using them. For example, if your document has cross-references
to headings, you'll likely have bookmarks prefixed with '_Ref'. Delete
those
and your cross-references are history. To see what all these bookmarks are
and what they refer to, run the following code. It will produce a listing
at
the end of the document:

Sub ListBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
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

After you've run this, you can see which ones might not be needed.

You can probably safely kill off any empty bookmarks, for which you can
use
the following code:

Sub KillEmptyBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
If ActiveDocument.Bookmarks.Count 0 Then
For Each oBkMrk In ActiveDocument.Bookmarks
If ActiveDocument.Bookmarks(oBkMrk).Empty = True Then oBkMrk.Delete
Next oBkMrk
End If
End Sub

If you then re-run the 'ListBkMrks' macro, the listing may be
significantly
shorter. Any other unwanted bookmarks are best deleted manually.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
I am using Word 2000 & I seem to have 1000's of hidden bookmarks. How can

I
get rid of them, besides using the bookmark dialog box which deletes them
one by one? I do have about 60 that I would like to keep if possible, but
would sacrifice them if need be to get rid of the 1000's.

--
Later,

-- Richard --






  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default bookmarks

Hi Richard,

Duplicate bookmarks could only exist if the same string was given more than
one bookmark. There may have been a good reason for that. If your document
has any, they'll be found by the ListBkMrks macro. You'll need to decide
which ones to keep/discard.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
Your macro's were a great help!

What about duplicate bk marks? How can I delete those?

Thanks,

Richard

"macropod" wrote in message
...
Hi Richard,

Getting rid of them is easy enough with a macro, but be careful - Word

may
actually be using them. For example, if your document has

cross-references
to headings, you'll likely have bookmarks prefixed with '_Ref'. Delete
those
and your cross-references are history. To see what all these bookmarks

are
and what they refer to, run the following code. It will produce a

listing
at
the end of the document:

Sub ListBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
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

After you've run this, you can see which ones might not be needed.

You can probably safely kill off any empty bookmarks, for which you can
use
the following code:

Sub KillEmptyBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
If ActiveDocument.Bookmarks.Count 0 Then
For Each oBkMrk In ActiveDocument.Bookmarks
If ActiveDocument.Bookmarks(oBkMrk).Empty = True Then

oBkMrk.Delete
Next oBkMrk
End If
End Sub

If you then re-run the 'ListBkMrks' macro, the listing may be
significantly
shorter. Any other unwanted bookmarks are best deleted manually.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
I am using Word 2000 & I seem to have 1000's of hidden bookmarks. How

can
I
get rid of them, besides using the bookmark dialog box which deletes

them
one by one? I do have about 60 that I would like to keep if possible,

but
would sacrifice them if need be to get rid of the 1000's.

--
Later,

-- Richard --








  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 5
Default bookmarks

I looked at the list & it has 100's that I don't need?

It also seems to repeat the text that is in the bk mrk?

It is impossible to go to every bkmrk to see whether it is needed or not?
Any ideas?

Richard

"macropod" wrote in message
...
Hi Richard,

Duplicate bookmarks could only exist if the same string was given more
than
one bookmark. There may have been a good reason for that. If your document
has any, they'll be found by the ListBkMrks macro. You'll need to decide
which ones to keep/discard.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
Your macro's were a great help!

What about duplicate bk marks? How can I delete those?

Thanks,

Richard

"macropod" wrote in message
...
Hi Richard,

Getting rid of them is easy enough with a macro, but be careful - Word

may
actually be using them. For example, if your document has

cross-references
to headings, you'll likely have bookmarks prefixed with '_Ref'. Delete
those
and your cross-references are history. To see what all these bookmarks

are
and what they refer to, run the following code. It will produce a

listing
at
the end of the document:

Sub ListBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
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

After you've run this, you can see which ones might not be needed.

You can probably safely kill off any empty bookmarks, for which you can
use
the following code:

Sub KillEmptyBkMrks()
Dim oBkMrk As Bookmark, oBmk As Variant
ActiveDocument.Bookmarks.ShowHidden = True
If ActiveDocument.Bookmarks.Count 0 Then
For Each oBkMrk In ActiveDocument.Bookmarks
If ActiveDocument.Bookmarks(oBkMrk).Empty = True Then

oBkMrk.Delete
Next oBkMrk
End If
End Sub

If you then re-run the 'ListBkMrks' macro, the listing may be
significantly
shorter. Any other unwanted bookmarks are best deleted manually.

Cheers

--
macropod
[MVP - Microsoft Word]


"Richard" wrote in message
...
I am using Word 2000 & I seem to have 1000's of hidden bookmarks. How

can
I
get rid of them, besides using the bookmark dialog box which deletes

them
one by one? I do have about 60 that I would like to keep if possible,

but
would sacrifice them if need be to get rid of the 1000's.

--
Later,

-- Richard --










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing bookmarks in footer on last page only Jan Page Layout 4 October 25th 06 04:13 PM
bookmarks shown in doc BorisS Microsoft Word Help 5 July 11th 06 11:37 PM
Bookmarks, hyperlinks and 'save as' PhenyxFire Microsoft Word Help 0 June 6th 06 08:20 PM
troubleshooting hyperlink bookmarks Kat Page Layout 2 August 29th 05 12:57 PM
Bookmarks appearing in HTML Format document links AndyBear Microsoft Word Help 3 June 1st 05 02:45 PM


All times are GMT +1. The time now is 02:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"