Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-14-2022, 03:12 PM
macropod's Avatar
macropod macropod is offline Trouble removing cross-references Windows 10 Trouble removing cross-references Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Somewhat simpler:
Code:
Sub KillAllBookmarks()
With ActiveDocument
  Do While .Bookmarks.Count > 0
     .Bookmarks(1).Delete
  Loop
End With
End Sub
and, if you only want to delete hidden bookmarks, more reliably:
Code:
Sub KillHiddenBookmarks()
Dim i As Long, bHid As Boolean
With ActiveDocument
  bHid = .Bookmarks.ShowHidden
  .Bookmarks.ShowHidden = True
  For i = .Bookmarks.Count To 1 Step -1
     With .Bookmarks(i)
      If Left(.Name, 1) = "_" Then .Delete
     End With
  Next
  .Bookmarks.ShowHidden = bHid
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble removing cross-references Trouble with Bulk Removing Unusual Footnotes CrossReach Word 3 06-25-2019 03:00 PM
About Cross-references mohsen.amiri Word 1 01-19-2017 10:35 AM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
Trouble removing cross-references Cross-References acolussi Word 9 05-16-2013 02:11 AM
Trouble removing cross-references Trouble Removing Password cure4glass Word 1 02-17-2012 07:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft