Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Zimmo Zimmo is offline
external usenet poster
 
Posts: 2
Default bookmarks

The code shown below was created in Visual Basic Editor and saved in the
normal.dot.. It appears in the Word document under MACROS but when I try to
run it in my document nothing happens. The bookmarks are still there. Am I
doing something wrong? I have close to 100 bookmarks that need to be
removed.

Sub RemoveLINKBookmarks()
Dim doc As Word.Document
Dim bkm As Word.Bookmark
Dim aBKM() As String
Dim counter As Long

Set doc = ActiveDocument
counter = 0
ReDim aBKM(doc.Bookmarks.Count)
For Each bkm In doc.Bookmarks
If InStr(bkm.Name, "_LINK") 0 Then
aBKM(counter) = bkm.Name
counter = counter + 1
End If
Next
For counter = LBound(aBKM()) To UBound(aBKM())
If Len(aBKM(counter)) 0 Then
doc.Bookmarks(aBKM(counter)).Delete
End If
Next
End Sub
 
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
How to remove all bookmarks in 40 pg doc? Barbara Wyman Microsoft Word Help 1 July 31st 06 05:45 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 11:03 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"