Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2020, 08:50 AM
AlfredStreich AlfredStreich is offline Reject all "Unknown Field Code Changed" Windows 10 Reject all "Unknown Field Code Changed" Office 2019
Novice
Reject all "Unknown Field Code Changed"
 
Join Date: Jan 2020
Posts: 4
AlfredStreich is on a distinguished road
Default Reject all "Unknown Field Code Changed"

I have documents with thousands of relative links. When the files are being edited the link field codes are being changed. I want to reject all the the hyperlink field code changes, but not any of the other content changes. I tried using the macro from this thread:

https://www.msofficeforums.com/word/...ield-code.html



This had no effect on the hyperlink changes. Is there a way to reword the macro to deal with the changes? I am attaching a document that contains these changes to show the issue.
Attached Files
File Type: docx INDEX_Patent_Litigation_RELEASE #9 update_cpc.docx (149.5 KB, 5 views)
Reply With Quote
  #2  
Old 04-23-2020, 02:43 PM
macropod's Avatar
macropod macropod is offline Reject all "Unknown Field Code Changed" Windows 7 64bit Reject all "Unknown Field Code Changed" Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

For your purposes, try:
Code:
Sub AcceptTrackedFieldCodeChanges()
Application.ScreenUpdating = False
Dim Fld As Field
With ActiveDocument
  .ActiveWindow.View.ShowFieldCodes = True
  For Each Fld In .Range.Fields
    Fld.Code.Revisions.AcceptAll
  Next
  .ActiveWindow.View.ShowFieldCodes = False
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-24-2020, 12:38 PM
AlfredStreich AlfredStreich is offline Reject all "Unknown Field Code Changed" Windows 10 Reject all "Unknown Field Code Changed" Office 2019
Novice
Reject all "Unknown Field Code Changed"
 
Join Date: Jan 2020
Posts: 4
AlfredStreich is on a distinguished road
Default

Thank you.

I changed the line:
Fld.Code.Revisions.AcceptAll

to:
Fld.Code.Revisions.RejectAll

and that did exactly what I wanted it to.
I really appreciate the help.
Reply With Quote
  #4  
Old 07-09-2021, 05:18 AM
le_robert le_robert is offline Reject all "Unknown Field Code Changed" Windows 10 Reject all "Unknown Field Code Changed" Office 2016
Novice
 
Join Date: Jul 2021
Location: France
Posts: 10
le_robert is on a distinguished road
Default

Hi there,

I came across this thread when looking for a solution to the 'Unknown Field Code Changed' issue, and the macro works great, so thank you.

However, I noticed that it would also accept/reject intentional field code changes (e.g. inserting a new hyperlink). Does anyone know if there is a way of tweaking it so that it only targets 'unknown' reviewers?

Any tips would be most appreciated. I'm currently trying to teach myself VBA in my new job (not IT!) so am keen to learn

Edit: I just discovered by showing the field codes that the change is actually a language change of the field code, so what I actually need to do is to write something to reject the 'Formatted: English (United Kingdom)' changes

Last edited by le_robert; 07-09-2021 at 05:29 AM. Reason: new info
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reject all "Unknown Field Code Changed" Field Code for TOC "- Continued" Text binar Word 5 02-05-2019 02:25 PM
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
Reject all "Unknown Field Code Changed" How to get "Track Changes" to ignore "Field Code Changed"? Joey Cheung Word 2 10-31-2014 07:55 PM
Reject all "Unknown Field Code Changed" Word options "field shading" reverts to "when selected" PaulBurcham Word 1 04-20-2013 11:18 AM
Reject all "Unknown Field Code Changed" How do I prevent the "author" or "owner" fields from being changed? Bones Word 3 06-08-2012 12:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:51 PM.


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