Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-26-2017, 03:52 PM
macropod's Avatar
macropod macropod is online now Error with exit macro Windows 7 64bit Error with exit macro Office 2010 32bit
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

Try:
Code:
Sub UnlinkFieldsCensus()
Dim Rng As Range, bHid As Boolean
Set Rng = Selection.Paragraphs(1).Range
With ActiveDocument
  .Unprotect
  Rng.Fields.Unlink
  With .Bookmarks
    bHid = .ShowHidden
    .ShowHidden = True
    While .Count > 0
      .Item(1).Delete
    Wend
    .ShowHidden = bHid
  End With
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error with exit macro Help with Macro error jar208 Excel Programming 2 12-06-2016 03:57 PM
Pictures animated exit abc3132 PowerPoint 0 02-26-2015 12:27 AM
Error with exit macro VBA error Content Control On Exit jec1 Word VBA 5 08-16-2014 08:14 PM
Error with exit macro Drop-Downs: Run Macro on Exit Andrew H Word VBA 15 11-16-2012 08:34 AM
Is there an exit on close ? mhdadmh Word 0 10-12-2006 04:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:19 PM.


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