View Single Post
 
Old 06-13-2014, 04:05 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It wasn't apparent from what you had previously posted that you wanted the entire page to change colour, and not just the text. For that, you could use:
Code:
Sub Colorize()
With ActiveDocument
  .Background.Fill.Visible = msoTrue
  Select Case .Range.Font.ColorIndex
    Case wdAuto, wdBlack
      .Range.Font.ColorIndex = wdWhite
      .Background.Fill.BackColor.TintAndShade = wdBlack
    Case wdWhite
      .Range.Font.ColorIndex = wdYellow
      .Background.Fill.BackColor.TintAndShade = wdBlack
    Case wdYellow
      .Range.Font.ColorIndex = wdAuto
      .Background.Fill.BackColor.TintAndShade = wdNoHighlight
      .Background.Fill.Visible = msoFalse
  End Select
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote