Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4100506
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:34:32+00:00 2026-05-20T20:34:32+00:00

We have had the unenviable happen: various master documents refer to sub-documents that are

  • 0

We have had the unenviable happen: various master documents refer to sub-documents that are no longer where they used to be due to a directory renaming. Is there a programmatic way of tweaking the HYPERLINK field without losing the master/sub-document relationship?

I’ve got this far …

Sub FixyaLinks()
    Dim s 'As String
    Dim i As Long
    Dim bTrackRevFlag As Boolean
    Dim bShowRevFlag As Boolean

    bTrackRevFlag = ActiveDocument.TrackRevisions
    bShowRevFlag = ActiveDocument.ShowRevisions

    ActiveDocument.TrackRevisions = False
    ActiveDocument.ShowRevisions = False

    For i = 1 To ActiveDocument.Fields.Count
    s = ActiveDocument.Fields.Item(i).Code.Text
    If InStr(s, "CURRICULUM\\NEW") Then
        s = Replace(s, "NEW Foundation Units-in developing", "Foundation Programme Units")
        ActiveDocument.Fields.Item(i).Code.Text = s
    End If
    Next
    ActiveDocument.TrackRevisions = bTrackRevFlag
    ActiveDocument.ShowRevisions = bShowRevFlag
End Sub

It bombs on ActiveDocument.Fields.Item(i).Code.Text = s, with an error 5686 (“The operation cannot be completed because the Track Changes option in the master document does not match the option the the subdocument. Make the Track Changes option the same in the master document and subdocument.”) However, I’m not entirely sure what that means.

Ideas anyone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:34:33+00:00Added an answer on May 20, 2026 at 8:34 pm

    Based on your code and writeup, I’d say that error basically means you’ve turned off track changes in the master before you run through it to fix it, but the subdoc link that you’re altering has track changes on.

    Have you tried turn ON track changes, and altering the link?

    You also should probably test for the KIND of field that you’re about to modify. There might be other kinds of fields in the document that AREN’T links, and you could mess them up inadvertently with this code. I think you do that with Field.Type

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have had a bug recently that only manifested itself when the library was
I have had many requests come in to a project that I work on,
Have had this happen alot, I forget to select the .java file before running
We have had an issue with a block of code that responds poorly in
I have had a road-block that has cascaded itself down to the situation described
I have had to start to learning C as part of a project that
I have had to work on a project that was written by someone else,
I have had overlapped IO working for 2 years now but ive used it
I have had contact with Google Chromium Code and that’s terrific for building applications
I have had to make changes to a trigger and assumed that running an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.