title: Word VBA - Applying alternate font color via styles does not work with text that has direct formatting (of font color) applied
body: <p>I have created a template (one of a series of many similar templates) that will be distributed to multiple users to be used to create transcripts (of audio and digital files). The transcript includes a number of styles that will be used exclusively to format the text.</p>
  
  <p>The template includes a series of macros that temporarily changes the font colors of each of the custom styles in order to aid in a quick proofing of the format, and then another macro to change them all back to the black/auto font color. </p>
  
  <p>As long as there is no direct formatting of font colors within any of the custom styles, this process works swimmingly. However, I am contemplating the possibility that some users might opt to select all the text and use the direct formatting method to restore the temp-colored fonts to black. If they do this, it renders all of the color-centric macros (change to a color, change back to black) useless.</p>
  
  <p>This could be very problematic because the transcripts produced by these users will ultimately be submitted to a subcontractor, who may wish to employ the color-centric macros herself for additional proofing before submitting the final transcript to her client. But they will no longer work if the user has applied direct formatting of font colors.</p>
  
  <p>I was able to remove the direct-formatting font color, both manually and via a macro, by using the "clear formatting" option, then reapplying the style. But that is not a practical solution for this conundrum because any given paragraph might contain other attributes such as bold, underlining, or italicized text, which is lost when the "clear formatting" option is applied. I contemplated applying character styles to those attributes, but there is no way I can guarantee that a user will use them, so there is still a risk of losing the attributes when trying to deal with the potential font color issue.</p>
  
  <p>I have conducted exhaustive experiments in Word and searched through the help files as well as extensively on Google, and I cannot find any information that facilitates removing ONLY the direct formatting relative to font colors while leaving other direct formatting attributes intact so that I can employ the macros to change the font colors within the styles.</p>
  
  <p>Am I missing the forest for the trees and going about this all wrong? Or is there one little element lacking in my macro code that would address this problem?</p>
  
  <p>I have copied the two main color-centric macros below. There are actually 8 additional macros that are part of this same category, because I'm also giving the user the option to change the font color in individual styles as well as the QUESTION and ANSWER style together (while not changing any other styles). But they are just identical snippets of the code shown below, paired down to deal with individual styles. </p>
  
  <p>Thanks in advance for any help!</p>
  
  <p>Change all the styles to a different color:</p>
  
  <pre><code>    Sub STYLES_AllColors()
  
          With ActiveDocument.Styles("#CENTERED (DS)")
                  .Font.ColorIndex = wdGray50
          End With
  
          With ActiveDocument.Styles("#FLUSH LEFT (DS)")
                  .Font.ColorIndex = wdDarkYellow
          End With
  
          With ActiveDocument.Styles("#PARENTHETICAL")
                  .Font.ColorIndex = wdViolet
          End With
  
          With ActiveDocument.Styles("#QUESTION (looped)")
                  .Font.ColorIndex = wdRed
          End With
  
          With ActiveDocument.Styles("#ANSWER (looped)")
                  .Font.ColorIndex = wdBlue
          End With
  
          With ActiveDocument.Styles("#QA2 (continuing paragraph)")
                  .Font.ColorIndex = wdTurquoise
          End With
  
          With ActiveDocument.Styles("#QA (plain format)")
                  .Font.ColorIndex = wdDarkRed
          End With
  
      End Sub
  </code></pre>
  
  <p>Change all the styles back to black/auto:</p>
  
  <pre><code>    Sub STYLES_AllBlack()
  
          With ActiveDocument.Styles("#CENTERED (DS)")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#FLUSH LEFT (DS)")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#PARENTHETICAL")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#QUESTION (looped)")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#ANSWER (looped)")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#QA2 (continuing paragraph)")
                  .Font.Color = wdColorAutomatic
          End With
  
          With ActiveDocument.Styles("#QA (plain format)")
                  .Font.Color = wdColorAutomatic
          End With
  
      End Sub
  </code></pre>