Consulting

Results 1 to 3 of 3

Thread: Find tracked changes, font color only

  1. #1
    VBAX Newbie
    Joined
    Jul 2017
    Posts
    2
    Location

    Find tracked changes, font color only

    I frequently work with large documents that have a lot of tracked changes. I would find it incredibly useful to have a macro that can identify places where the font color has been changed and reject those changes. For this particular operation, I want to ignore all other tracked changes, including changes to other font attributes. So far, I have this:

    For Each trackedchange In ActiveDocument.Revisions
      If ActiveDocument.Revisions(1).Type = 3 Then
        ActiveDocument.Revisions(1).Reject
      End If
    Next trackedchange
    The problem here is that it finds any kind of change to the font, be it color, italics, bold, whatever. Is there a way to specify font color only?

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    3,447
    Location
    Track changes does not have a parameter for font colour changes - you would have to use a loop such as you now have and add to it a comparison of the before/after text to establish what has changed. The challenge will be to determine whether and what to do where changing the font colour is only part of the overall change.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  3. #3
    VBAX Newbie
    Joined
    Jul 2017
    Posts
    2
    Location
    Quote Originally Posted by macropod View Post
    Track changes does not have a parameter for font colour changes - you would have to use a loop such as you now have and add to it a comparison of the before/after text to establish what has changed. The challenge will be to determine whether and what to do where changing the font colour is only part of the overall change.
    Thanks. I was kind of hoping there might be some kind of thing I could use like "If FontColorChanged = True" or whatever. Since Word is able to tell me that the color has been changed in the little info balloon off to the side, I was thinking that value might be stored somewhere in a way that would make it readily accessible to me. But you've pointed me in the right direction, and I'll play around with it for a bit and see if I can get something to work.

    Failing that, I have another way to deal with it that I know will work, something I can do earlier in the workflow, but it would be a lot easier to do it the way I'm wanting to do it here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •