title: VBA Word: Difference between Font.TextColor and Font.ColorIndex?
body: <p>I have a macro that insert text. It was working well so far but... Now for some documents, I get an error 445 when it applies color.
  Here is the code:</p>
  
  <pre><code>'Some code before that insert a first page with a different section and writes into the header
  ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
  Selection.TypeParagraph
  
  With Selection.Font
      .Name = "Calibri"
      .Size = 14
      .Bold = True
      .Italic = False
      .TextColor = RGB(68, 114, 196)
  End With
  
  With Selection.ParagraphFormat
      .Alignment = wdAlignParagraphCenter
      .SpaceAfter = 6
  End With
  
  Selection.TypeText Text:="eReference file for work order: "
  ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:="workorder"
  
  Selection.TypeParagraph
  </code></pre>
  
  <p>I've notice that if I change "Selection.Font.TextColor = RGB(68, 114, 196)" and replace it by "Selection.Font.ColorIndex = wdDarkBlue", it works. Hence my question: What's the difference between the two? Why is there some document for which "Textcolor"doesn't work ?</p>
  
  <p>Thank you !</p>