Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to remove all bookmarks in 40 pg doc? | Microsoft Word Help | |||
bookmarks shown in doc | Microsoft Word Help | |||
Bookmarks, hyperlinks and 'save as' | Microsoft Word Help | |||
troubleshooting hyperlink bookmarks | Page Layout | |||
Bookmarks appearing in HTML Format document links | Microsoft Word Help |