#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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] |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
How to get "Track Changes" to ignore "Field Code Changed"? | Joey Cheung | Word | 2 | 10-31-2014 07:55 PM |
Word options "field shading" reverts to "when selected" | PaulBurcham | Word | 1 | 04-20-2013 11:18 AM |
How do I prevent the "author" or "owner" fields from being changed? | Bones | Word | 3 | 06-08-2012 12:15 AM |