View Single Post
 
Old 06-23-2016, 04:05 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

Quote:
Originally Posted by mktate View Post
I wasn't clear enough in my original post - the REF fields in the Unconditional text behaves properly and does not unlink (remains a field after applying code); however, the REF fields within the Conditional text does NOT behave properly and DOES unlink - with my code AND with your code.
That, presumably, is because your conditional text is controlled by IF fields (which you hadn't mentioned), in which case what's happening is that those get unlinked. To prevent that, you could change:
If .Type <> wdFieldRef Then
to:
If (.Type <> wdFieldRef) And (.Type <> wdFieldIf) Then
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote