how do I shade alternate lines of text

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.
 
P

Pat Garard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top