how do I shade alternate lines of text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have full landscape pages of data and having alternate lines shaded or
highlighted in some way would make it easier to read across the page.
Note this is a large document that I use a Macro to format from a file
delivered from a mainframe computer and so the solution should be able to be
automated too.
 
G'Day Nifty,

If you are formatting lines of data, then I reason that they are inserted
into the document as Paragraphs.

Get your original Macro to count lines, for Odd lines apply shading to
Paragraph, for Even lines skip.

The following simple Macro will apply 15% gray shading to the current
Paragraph (it doesn't even have to be selected)......

Sub Shade()
'
'
With Selection.ParagraphFormat
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorGray15
End With
End With
End Sub
 
Back
Top