Bookmarks

E

Edmon

I have in a word document about 90 bookmarks in Word 2007, How can I remove
them all in one time.
 
C

CyberTaz

I don't know of any way to do so. Bookmarks are handled in a special way &
you can't select multiple Bookmarks in the dialog box. AFAIK you have to
delete each individually.

However, you've posted to the group for Mac Word. Even so, I've checked in
2007 & found no other options unless it can be done programmatically. I'd
suggest you ask in one of the PC Word groups:
 
M

macropod

Hi Edmon,

As Bob (Cyber Taz) says, there's no command for deleting all bookmarks in once go - they need to be deleted one at a time. Here's a
macro to do the job:

Sub KillBkMrks()
Dim oBkMk As Bookmark
With ActiveDocument
.Bookmarks.ShowHidden = True
For Each oBkMk In .Bookmarks
oBkMk.Delete
Next
.Bookmarks.ShowHidden = False
End With
End Sub

Be warned, though, you'll destroy any cross-references etc by deleting the bookmarks to which they refer.
 
J

John McGhie

Hi Macropod:

Don't you have to work backwards up the Bookmarks collection?

For oBkMk = .Bookmarks.count to 1 step -1
oBkMk.Delete
Next

I always found if you went forwards, the collection re-numbers and you get
only every second one.

Cheers


Hi Edmon,

As Bob (Cyber Taz) says, there's no command for deleting all bookmarks in once
go - they need to be deleted one at a time. Here's a
macro to do the job:

Sub KillBkMrks()
Dim oBkMk As Bookmark
With ActiveDocument
.Bookmarks.ShowHidden = True
For Each oBkMk In .Bookmarks
oBkMk.Delete
Next
.Bookmarks.ShowHidden = False
End With
End Sub

Be warned, though, you'll destroy any cross-references etc by deleting the
bookmarks to which they refer.

This email is my business email -- Please do not email me about forum
matters unless you intend to pay!

--

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 
M

macropod

Hi John,

If you're iterating with a counter, maybe, but that's not what my macro does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top