Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-22-2016, 09:23 PM
macropod's Avatar
macropod macropod is offline Cross Reference REF fields Unlink Windows 7 64bit Cross Reference REF fields Unlink Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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

Your code unlinks all fields as soon as it finds one that is not a cross-reference. To update & unlink fields other than cross-references, use code like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Fld As Field
For Each Fld In ActiveDocument.Fields
  With Fld
    If .Type <> wdFieldRef Then
      .Update
      .Unlink
    End If
  End With
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross reference is bad. Leffken Word 1 06-09-2016 03:12 PM
Cross Reference REF fields Unlink Totaling specific configuration selections that cross reference multiple fields (tricky) lonniepoet Excel Programming 1 06-09-2016 09:54 AM
Cross Reference REF fields Unlink prevent word fields from unlink mktate Word VBA 5 03-13-2016 02:07 PM
Cross Reference REF fields Unlink Reference number and cross reference for equation numbers to match the thesis format wmac Word 1 05-14-2013 08:54 PM
manipulating cross-reference fields _wim_ Word 0 12-10-2010 05:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:50 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